Question: answer quickly.urgent please Question 1 [40 pts] Implement the below classes and interface as presented in the following UML diagram except the class BasicSubscriber for

answer quickly.urgent please Question 1 [40 pts] Implement the below classes andanswer quickly.urgent please

Question 1 [40 pts] Implement the below classes and interface as presented in the following UML diagram except the class BasicSubscriber for which you will find the code provided below. For all classes implement only the getters that you will need later in your code. SpotifyPage title: String - nbOfSubscribers: int Subscriber - subscribers: Subscriber[] #id: int SpotifyPage (title:String, maxNbOfSub:int) # name: String addSubscriber(s: Subscriber): void #monthlyFees: double + subscriberById(id:int): subscriber + Subscriber (id: int, name: String) + nbOfPremiumSubscribers(): int + toString(): String + totalMonthly Income(): double > Discountable + feesAfter Discount(): double Basic Subscriber PremiumSubscriber - joinDate: String - premium Years: int + Constructor (--All Parameters--) + Constructor (--All Parameters--) + toString(): String + toString(): String A. [6 pts) Write the abstract class Subscriber as presented in the above UML. a) Write the constructor that takes as parameters all data fields. b) Assuming a subscriber has an id of 12345, name of John White, and monthly fees of 50, the toString method should return a String in the following format: ID: 12345, Name: John White, Monthly Fees: $50.0 B. [4 pts] Write the interface Discountable

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!