Design an application that declares three phonecalls set


a) Design a class named PhoneCall with four field's: two strings that hold the 10 digit phone numbers that originated and received the call, and two numeric fields that hold the length of the call in minutes and the cost of the call. Include a constructor that sets the phone numbers to Xs and the numeric fields to 0. Include get and set methods for the phone number and call length fields, but do not include a set methods for the phone number and call length fields, but do the cost of the call at three cents per minute for the first 10 minutes, and two center per subsequent minute. Create the class diagram and write the pseudocode that defines the class.

b) Design an application that declares three PhoneCalls. Set the length of one PhoneCall to 10 minutes, another to 11 minutes, and allow the third object to use the defaut value supplied by the constructor. Then, display each PhoneCall's value.

c) Create a child class named InternationalPhoneCall. Overried the parent class method that sets the call length to calculate the cost of the call at 40 cents per minute.

d) Create the logic for an application that instantiates a PhoneCall object and an InternationalPhoneCall object and displays the cost for both.

a) is completed I need b), c), and d).

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Design an application that declares three phonecalls set
Reference No:- TGS0661550

Expected delivery within 24 Hours