Question: Solve it with java language Extra Lab:- Instructor: Complete the following tasks in Java within the lab time using NetBeans. Task 1: Create class Course

Solve it with java language  Solve it with java language Extra Lab:- Instructor: Complete the following

Extra Lab:- Instructor: Complete the following tasks in Java within the lab time using NetBeans. Task 1: Create class Course with the course ID, name, mark and number of courses as private data members. You must add any needed methods and constructors Task 2: Create class Citizen constructors with the ID and name as data members. You should add any needed methods or Task 3: Create class Student which is a sub class from Citizen class Add a list of the student's registered courses as a ArrayList from class Course.Again, all these data members must be declared as private instance variable and you should add any needed methods In this class you should override obj.equals(obj) method. Task 4 Create an interface called Courselnterface, it contain this signature of method: Public void NewCourse) then implement this method in Student class to add a course to the arraylist and implement it in Course class to update number of courses Task 5 Create class University with a main method in it. In the main method create an ArrayList of students. Fill it with at least 4 Student objects. Then print the list of students and their information( courses and marks ) sorted by their names. Hit: to compare between two string use of the following methods Methods for two strings lexicographically. Returns an ndicating whether this string is greater than is>0), equal to (result is # 0). or less than nt compareTo (String anothe rString) two strings lexicographically, ignoring n case. Returns an integer indicating his string is greater than (result is> 0), to (resuit is -0) or less than (result is e 0) nt compareToIgnoreCase (String str

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!