Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA Please note the following: - You should apply the information hiding principle when necessary. - Instance variables whose values do not change after being
JAVA
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started