Question: Implement the driver class (application) as follows: a) Create a SpotifyPage of your choice and give it a capacity of 10. Add one premium subscriber

Implement the driver class (application) as follows: a) Create a SpotifyPage of your choice and give it a capacity of 10. Add one premium subscriber and two basic subscribers of your choice to the page created. b) Write a code that asks the user to enter the id of a subscriber and print its name on the screen if found, or display an error message otherwise. c) Write a code that displays the information of the basic subscribers in the page.

Implement the driver class (application) as follows: a) Create a SpotifyPage of d) Write a code that displays the number of subscribers who have been premium for more than 5 years.

Question 1 [20 points] Implement the class Student only. The code of the classes GradStudent and UndergradStudent is provided below. Student - id: int - name: String - courses: ArrayList + Student(id: int, name: String) + getId(): int + getName(): String + setId(id:int): void + setName(name: String): void + getCourses():ArrayList + addCourse(cName: String): void + dropCourse(cName: String): void + toString(): String Undergrad Student - nbOfCreditsEarned: int + UndergradStudent(id:int, name: String, nbOfCreditsEarned: int) + getNbOfCreditsEarned(): int + setNbOfCreditsEarned(n: int): void | + toString(): String GradStudent - found Internship: boolean + GradStudent(id:int, name: String, foundInternship: boolean) + getFound Internship(): boolean + setFoundInternship(f:boolean): void | + toString(): String A. The Student class is characterized by three data fields: an int id, a String name, and an array list of String courses. Write the following methods: a) A constructor to initialize the id and the name data fields. b) Getters and setters (as shown in the UML). c) addCourse method that takes as parameter the name of the course to be added to the array list. d) dropCourse method that takes as parameter the name of the course to be deleted from the array list. e) A to String method to return information about all data fields. For Example: Student id: 9000123, name: Khaled Haddad, Courses Enrolled: CSCI250, CSCI250L, CSC200, NUTR 100. Question 1 [20 points] Implement the class Student only. The code of the classes GradStudent and UndergradStudent is provided below. Student - id: int - name: String - courses: ArrayList + Student(id: int, name: String) + getId(): int + getName(): String + setId(id:int): void + setName(name: String): void + getCourses():ArrayList + addCourse(cName: String): void + dropCourse(cName: String): void + toString(): String Undergrad Student - nbOfCreditsEarned: int + UndergradStudent(id:int, name: String, nbOfCreditsEarned: int) + getNbOfCreditsEarned(): int + setNbOfCreditsEarned(n: int): void | + toString(): String GradStudent - found Internship: boolean + GradStudent(id:int, name: String, foundInternship: boolean) + getFound Internship(): boolean + setFoundInternship(f:boolean): void | + toString(): String A. The Student class is characterized by three data fields: an int id, a String name, and an array list of String courses. Write the following methods: a) A constructor to initialize the id and the name data fields. b) Getters and setters (as shown in the UML). c) addCourse method that takes as parameter the name of the course to be added to the array list. d) dropCourse method that takes as parameter the name of the course to be deleted from the array list. e) A to String method to return information about all data fields. For Example: Student id: 9000123, name: Khaled Haddad, Courses Enrolled: CSCI250, CSCI250L, CSC200, NUTR 100

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!