Computers and Technology
Computers and Technology, 10.05.2021 20:40, mia36492

Ensure that all files are well commented and documented. Part 1 - Person Class Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Also include a toString method that displays the person information. Customer Class Design a class named Customer, which inherits from the Person class. The Customer class should have a field for a customer number and a Boolean field indicating whether the customer wishes to be on a mailing list. Write one or more constructors, and the appropriate mutator and accessor methods, for the class's fields. Also include a toString method that displays the superclass information followed by the customer information. CustomerTest Class This class contains a main program to test your Customer objects. Demonstrate you can create a Customer object and display the object's information. Part 2 - Preferred Interface Create a public interface called "Preferred". This interface should specify an abstract method called "getDiscount" that takes no arguments. Preferred Customer Class This class inherits from the Customer class and implements the Preferred interface. The Preferred Customer class should have fields for the amount of the customer's purchases and the customer's discount level. The discount level is determined the following way: β€’ When a preferred customer spends $500, he or she gets a 5% discount on all future purchases.
β€’ When a preferred customer spends $1000, he or she gets a 5% discount on all future purchases.
β€’ When a preferred customer spends $1500, he or she gets a 7% discount on all future purchases.
β€’ When a preferred customer spends $2000, he or she gets a 10% discount on all future purchases.
Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. A toString class should display all customer information, including the amount of purchase and discount level.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, HannahVance99
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
image
Computers and Technology, 23.06.2019 17:30, Annlee23
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2Δƒβ€”, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5Δƒβ€” slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
image
Computers and Technology, 24.06.2019 19:00, stephanieanaya7
In python a floating-point number must be written using scientific notation?
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, shonesam98
Regular maintenance is a key component of automotive lift safety.
Answers: 1
Do you know the correct answer?
Ensure that all files are well commented and documented. Part 1 - Person Class Design a class named...

Questions in other subjects:

Konu
Mathematics, 05.10.2021 20:50