Design an application that declares three phonecalls

Assignment Help Computer Engineering
Reference no: EM13322880

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).

 

Reference no: EM13322880

Questions Cloud

Construct a dfa that recognizes languages : Construct a DFA that recognizes each of the following languages. Unless otherwise noted we are assuming that ω ∈ {0,1}*. (A drawing of a state diagram is sufficient.)
Write the program with at least two functions to solve : Write the program with at least two functions to solve the following problem.
Find the w what temperature : A bottle containing 1 kg of water (18.01g/mol) is boiled until evaporation is complete. Find w, q, U, H for the process. Hvap = 40.6kJ/mol. My question is when we find the w what temperature we use (room temperature or 100 C)
Compute the energy of a mole of a photon : Photosynthesis uses 660 nm light to convert carbon dioxide and water into gluclose and oxygen. calculate the energy of a mole of a photon
Design an application that declares three phonecalls : 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.
Find the relativistic momentum of the proton moving : A proton is accelerated from rest to 0.75c. Find the relativistic momentum of the proton moving at 0.75c.
Define terminal alkynes are acidic compounds with pka values : Terminal alkynes are acidic compounds, with pKa values around 25. That means they are about: a. one million times more acidic than water b. one billion times more acidic than water c. one billion times less acidic than water d. one thousand times ..
How many bits will be the network prefix in each address : You talk to a colleague and she tells you that her company just bought 10.16.0.0/12 addresses at a price that is significantly lower than what your ISPs are charging you. Does this sound like a good deal to you? If so, why?
Homologous recombination is initiated : Homologous recombination is initiated

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the formal change management system

The project could fail because the cost of a key component has increased and we could build a product that does not achieve its production cost target.

  Make a paper describing what office automation

make a paper describing what office automation and group collaboration software is used in your organization. Include an analysis of the advantages and disadvantages of each software used.

  Design a "hello world" program in java

Each of the threads must be able to communicate with other threads by sending messages to them. The communication should be purely distributed in the sense that no other shared object is available to threads besides of the Thread array workers.

  Make a paper analyzing the use of databases

make a paper analyzing the use of databases in your organization. Include what database applications are used (Microsoft Access, DB2, Oracle, etc.). Conclude by proposing improvements.

  Role of antennas in transmitting radio waves

Explain the role of antennas in transmitting the radio waves. What kinds of antenna are typically used in the wireless LAN?

  Function to input the 20 integers in the range of 1 to 6.

In C Write down the main function in order to input the 20 integers in range of 1 to 6. Write down a function in order to count number of times the numbers 2 and 5 occur.

  Organization to consolidate servers

Utilizing any organizational model from your experience and or research, describe the pros and cons of this organization in order to consolidate the servers and to relocate the primary data centers.

  Define the quicksort algorithm to sort vector v

define the quicksort algorithm to sort vector v. During each pass, list all exchanges of a pair of elements in the lower and upper sublist.

  What is the gain of using rule sets

What is the gain of using rule sets

  Bcnf and demonstrate how you will fix it

Find out or create an example of a violation of a normal form that you would allow, tell why you are allowing the violation and explain how you would protect against anomalies.

  Developing program for real estate agent in java language

Write down a java program for the real estate agent. The program must carry out the following tasks: Ask the users for average house price for the each of the past 5 years for the single family residence of 1500 square feet.

  Create program to read the lengths of the two legs

Write down a program to read the lengths of the two legs of a right triangle and to calculate and display the area of the triangle (one-half the product of the legs) and the length of the hypotenuse (square root of the sum of the square of the leg..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd