Question: Design and implement a set of classes that define various courses in your curriculum. Include information about each course such as the title, number, description,

Design and implement a set of classes that define various courses in your curriculum. Include information about each course such as the title, number, description, and department that teaches the course. Consider the categories of classes that constitutes your curriculum when designing your inheritance structure. Create a main driver class to instantiate and exercise several of the classes. CODE REQUIRED IN JAVA.

*earlier uploaded codes are not executing* code is /* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Course { String description="Course is Computer Science"; // display method of superclass public void displayCourse() { System.out.println("The description from parent class.... main "+description ); } } class CProgramming extends Course { String description ="C language programming"; String title="C"; int number=502; String department="Programming"; // display method of sub class public void display() { System.out.println("The title of the course in the Ciricuulum is "+title+" , ID is "+number+". Description: "+description+". The "+department+" teaches this course" ); } } class Computer_Networking extends Course { String description ="Computer Networking and Programming"; String title="CN"; int number=501; String department="CSEDepartment"; // display method of sub class public void display() { System.out.println("The title of the course in the Ciricuulum is "+title+" ,ID is "+number+". Description: "+description+". The "+department+" teaches this course" ); } public static void main(String args[]) { Course obj = new Course (); obj.displayCourse(); Computer_Networking cnobj=new Computer_Networking(); cnobj.displayCourse(); //calling main class using subclass cnobj.display();//this will call the parent class CProgramming cobj=new CProgramming(); cobj.display(); } } and another code is //Course.java: package chegg; public class Course { public String courseTitle; public String department; public String courseNum; public String description; public Course(String name, String deptName, String id, String desc) { courseTitle = name; department = deptName; courseNum = id; description = desc; } public void Course11(String name, String deptName, String id, String desc) { } public void Course1(String name, String deptName, String id, String desc) { } public void getDiscription() { System.out.println("Course Title is " + courseTitle); System.out.printf("Course Number is " + courseNum); System.out.printf("Course is offered by the Department of "+ department); System.out.printf("Course Description : " + description); } } //JAVA.java: package chegg; public class JAVA extends Course{ public JAVA(String name, String deptName, String id, String desc) { super(name, deptName, id, desc); } public void getDiscription() { System.out.println("Course Title is " + courseTitle); System.out.println("Course Number is " + courseNum); System.out.println("Course is offered by the Department of "+ department); System.out.println("Course Description : " + description); System.out.println("--------------------------------------"); } } //PHP.java: package chegg; public class PHP extends Course { public PHP(String name, String deptName, String id, String desc) { super(name, deptName, id, desc); } public void getDiscription() { System.out.println("Course Title is " + courseTitle); System.out.println("Course Number is " + courseNum); System.out.println("Course is offered by the Department of "+ department); System.out.println("Course Description : " + description); System.out.println("--------------------------------------"); } } //Databasesystems.java: package chegg; public class PHP extends Course { public PHP(String name, String deptName, String id, String desc) { super(name, deptName, id, desc); } public void getDiscription() { System.out.println("Course Title is " + courseTitle); System.out.println("Course Number is " + courseNum); System.out.println("Course is offered by the Department of "+ department); System.out.println("Course Description : " + description); System.out.println("--------------------------------------"); } } //c_programming.java: package chegg; public class C_Programming extends Course { public C_Programming(String name, String deptName, String id, String desc) { super(name, deptName, id, desc); } public void getDiscription() { System.out.println("Course Title is " + courseTitle); System.out.println("Course Number is " + courseNum); System.out.println("Course is offered by the Department of " + department); System.out.println("Course Description : " + description); System.out.println("--------------------------------------"); } } //mydd.java: package chegg; public class mydd { public static void main(String[] args) { Course obj1, obj2, obj3, obj4; obj1 = new C_Programming("C_Programming", "ComputerScience", "1A","C is a basic programming language for freshers"); obj2 = new PHP("PHP", "ComputerScience", "2A","PHP is a scripting language and it is for experts"); obj3 = new JAVA("JAVA", "ComputerScience", "3A","Java is a high-level language and its pre-requiste is C programming"); obj4 = new DatabaseSystems("Database Systems", "ComputerScience", "4A","The Back-end for Software-Application"); obj1.getDiscription(); obj2.getDiscription(); obj3.getDiscription(); obj4.getDiscription(); } } please post apart from these codes...

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!