Question: JAVA Please note the following: - You should apply the information hiding principle when necessary. - Instance variables whose values do not change after being

JAVA
JAVA Please note the following: - You should apply the information hiding

Please note the following: - You should apply the information hiding principle when necessary. - Instance variables whose values do not change after being initialized must be declared final e.g., names and date of birth. Provide the necessary public setter/getter methods. These are not shown in the class diagram. - You should validate the string instance variables are not mull when they are initialized. - Use toString0 in classes Subscription and Member to print the relevant object's information. Grade is an enumerated type with the following values: Classic, Golden, and Platimum. The subscription fees are 200 AED for Classic, 500 AED for Golden, and 1000 AED for Platinum. . The id field is automatically generated by the program. The first member created gets the id of 1 ; the second one gets the id of 2 , etc. - You should define the constructors as specified. Validate the values of the instance variables when necessary. Create a test class named MembersTest which contains the main method. In it, create several members with information similar to the following table. Then, print the information of all members followed by a printout of the number of members and the total subscription fees

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!