Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions