Question: How would I write the addpurchase and delete purchase methods using java? Requirements: The Cardholder class is an abstract class from which other cardholder classes

How would I write the addpurchase and delete purchase methods using java?How would I write the addpurchase and delete purchase methods using java?Requirements: The Cardholder class is an abstract class from which other cardholder

Requirements: The Cardholder class is an abstract class from which other cardholder classes are derived. It contains fields and methods that will be inherited by the classes derived from Cardholder. Design: The Cardholder class has fields, a constructor, and methods as outlined below (1) Fields: category, acctNumber, name (all String objects), prevBalance of type double, payment of type double, an array of type double representing new purchases; and a public constant INTEREST_RATE set to 0.01 (a double). The instance variables should be protected rather than private. (2) Constructor: The constructor accepts String objects for the card holder's acctNumber and name as and assigns the fields accordingly. The constructor should also create the purchases array of type double with initial length of 0 and assign the field. (3) Methods: Usually a class provides methods to access and modify each of its instance variables (i.e., getters and setters) along with any other required methods. The methods for Cardholder are described below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!