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

  Create a program that reads an exchange rate

Write a program that reads an exchange rate for converting English currency to U.S. currency and after that reads several values in English currency and converts each amount to the equivalent U.S. currency.

  How to calculate the bmi of a team player

how to calculate the BMI of a team player.the formula to calculate the BMI is as follows.

  How to assemble and debug the problem

Write down a program using the mov instruction to produce the following results. Assemble and debug the problem.

  Design a script that inputs five numbers

Write down a script that inputs five numbers and determines and outputs XHTML text that displays the number of negative numbers input, the number of positive numbers input and the number of zeros input.

  How to handle the customervalidator''s servervalidate event

Write down a method that handles the CustomerValidator's ServerValidate event. In addition, write a JavaScript function for the CustomValidator's CustomValidationFunction property.

  Create program that reads from the external file input.txt

create a program that reads from the external file input.txt

  Find user allowed to purchase particular restricted product

I need to create a simple age calculator to find if a user is allowed to purchase a particular restricted product. I need to model an abstract class to represent generic restricted product and concrete classes to represent alcohol, tobacco, R-rate..

  Accessing i/o device

Consider a program which is accessing a single I/O device and compare the un-buffered I/O for the use of a buffer.

  Create a testrectangle class in java

An overloaded constructor that takes integer width and height arguments, uses a separate method to check whether the width and height fall within the range between 0 and 30, and throws an exception if out of range.

  What could possibly be used as a key field

I need help with doing some web search research on relational databases and define briefly how such a database works, and basic components.

  What is cascading style sheets (css)

Cascading Style Sheets (CSS), a multi-featured specification for HTML, offers designers an expedient, powerful process to control formatting and layout of Web pages.

  List the two new or changed features in ipv6

List two new or changed features in IPv6. define how each one affects Internet Protocol including the affects to inter-networking issues. Be thorough in your discussion.

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