subject

Define a class named Payment that contains an instance variable of type double that stores the amount of the payment and appropriate get and set methods. Also, create a method named paymentDetails that outputs an English sentence to describe the payment amount. Next, define a class named CashPayment that is derived from Payment. This class should redefine the paymentDetails method to indicate that the payment is in cash. Include appropriate constructor(s). Define a class named CreditCardPayment that is derived from Payment. This class should contain instance variables for the name on the card, expiration date, and credit card number. Include appropriate constructor(s). Finally, redefine the paymentDetails method to include all credit card information. Define a class named PaymentTest class that contains the main() method that creates two CashPayment and two CreditCardPayment objects with different values and calls paymentDetails for each. (5 pts)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Why is hard disk space important to an audio engineer? why are usb ports and firewire ports useful for an audio engineer? explain in 2-3 sentences. (3.0 points) here's a list of different audio software: ableton live apple inc.'s garageband apple inc.'s logic studio digidesign's pro tools propellerhead sofware's reason sony creative software's acid pro steinberg cubase steinberg nuendo choose one of the software programs listed above, and then go to that software program's web site. read about what the software program is used for, and then write 4-5 sentences about what you learned. (10.0 points) which type of software license is the most limiting? why? explain in 2-3 sentences. (3.0 points) when sending a midi channel voice message, how can you control the volume of the sound? explain in 2-3 sentences. (4.0 points)
Answers: 1
You know the right answer?
Define a class named Payment that contains an instance variable of type double that stores the amoun...
Questions
question
Mathematics, 28.05.2021 15:40
question
Mathematics, 28.05.2021 15:40
question
Mathematics, 28.05.2021 15:40
question
World Languages, 28.05.2021 15:40
question
Mathematics, 28.05.2021 15:40
Questions on the website: 13722360