Exe2: Creating a Package class and its child class The Package class includes 1. auto-implemented properties for an ID n

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Exe2: Creating a Package class and its child class The Package class includes 1. auto-implemented properties for an ID n

Post by answerhappygod »

Exe2 Creating A Package Class And Its Child Class The Package Class Includes 1 Auto Implemented Properties For An Id N 1
Exe2 Creating A Package Class And Its Child Class The Package Class Includes 1 Auto Implemented Properties For An Id N 1 (111.46 KiB) Viewed 23 times
Exe2: Creating a Package class and its child class The Package class includes 1. auto-implemented properties for an ID number, recipient's name, and weight in ounces. 2. public Package (string number, string recipientName, double weight) - This constructor takes three arguments and assigns them to the appropriate fields. 3. Define method named GetPrice to calculate the delivery price for the Package object, Price depends on weight, the price is $5 for the first 32 ounces and 12 cents per ounce for every ounce over 32. Create a child class named InsuredPackage, which includes: a field for the package's value. Override the method GetPrice that sets a Package's delivery price to include insurance, which is $1 for packages valued up to $20 and $2.50 for packages valued $20 or more. In your main method write the code to do the following: 1. Create an object for Package class 2. Create an obejct for InsuredPackage class 3. Display two objects' delivery price. Examination requirements: 1. Create solution named "Test1YourName", which contains two application named EXE1 and EXE2; submit the compressed file. 2. There should be comments in the code 3. Record running video and submit
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply