Program #2 1. Show StudentsADT interface 1. Create a Course class with the following methods: default constructor, overloaded constructor, copy constructor, setCourseName, setSectionNumber,...

1 answer below »
The data structure in java.


Program #2 1. Show StudentsADT interface 1. Create a Course class with the following methods: default constructor, overloaded constructor, copy constructor, setCourseName, setSectionNumber, setNumberOfCredits, setLink, getCourseName, getSectionNumber, getNumberOfCredits, getLink, toString 1. Create a Students class with the following methods: default constructor, overloaded constructor, copy constructor, setMaxNumberOfStudents, addStudent, addCourse (pass 2 args), dropCourse (2 args), toString 1. Create an Inner class called Student inside Students class with the following methods: default constructor, overloaded constructor, setID, setCourses, getID, getCourses, addCourse (pass 1 arg), dropCourse (1 arg), toString 1. Create a StudentsDemo class by adding the students with IDs: 1111, 1234, 2357 1. Display the following menu: “What action would you like to implement?” 1: Show all Students 2: Add a Course 3: Drop a Course 9: Quit
Answered 1 days AfterMay 27, 2021

Answer To: Program #2 1. Show StudentsADT interface 1. Create a Course class with the following methods:...

Kshitij answered on May 29 2021
159 Votes
may28_21/Course.java
may28_21/Course.java
/*   Created by IntelliJ IDEA.
 *   Author: Kshitij Varshney (kshitijvarshne1)
 *   Date: 28-May-21
 *   Time: 10
:37 PM
 *   File: Course.java
 */
package May.may28_21;
public class Course {
    private String courseName;
    private int sectionNumber;
    private int numberOfCredits;
    public Course(String courseName, int sectionNumber, int numberOfCredits) {
        this.courseName = courseName;
        this.sectionNumber = sectionNumber;
        this.numberOfCredits = numberOfCredits;
    }
    public String getCourseName() {
        return courseName;
    }
    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }
    public int getSectionNumber() {
        return sectionNumber;
    }
    public void setSectionNumber(int sectionNumber) {
        this.sectionNumber = sectionNumber;
    }
    public int getNumberOfCredits() {
        return numberOfCredits;
    }
    public void setNumberOfCredits(int numberOfCredits) {
        this.numberOfCredits = numberOfCredits;
    }
    @Override
    public String toString() {
        return "Course{" +
                "courseName='" + courseName + '\'' +
                ", sectionNumber=" + sectionNumber +
                ", numberOfCredits=" + numberOfCredits +
                '}';
    }
}
may28_21/StudentDemo.java
may28_21/StudentDemo.java
/*   Created by IntelliJ IDEA.
 *   Author: Kshitij Varshney (kshitijvarshne1)
 *   Date: 28-May-21
 *   Time: 10:55 PM
 *   File: StudentDemo.java
 *   Email: ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here