Question
Develop a Java application for the question below Define a superclass named Membership with attributes named memberID and name. The class Membership will have an
Develop a Java application for the question below
Define a superclass named Membership with attributes named memberID and name. The class Membership will have an instance method named display() that will display the value of all its attributes. Define TWO (2) subclasses named Premium and Standard. The differences between the Premium membership and Standard membership are that a Premium member will be able to collect points for every dollar spent with its affiliates, while a Standard member has a limit of total access to the facilities provided in a month. For each of these subclasses, provide at least ONE (1) instance method to update the value of the respective class instance variables. Override the instance method in the Membership class to display the necessary details of the respective subclass attributes. Include an overloaded constructor for all the superclass and subclasses
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