ProductsLogo
LogoStudy Documents
LogoAI Grader
LogoAI Answer
LogoAI Code Checker
LogoPlagiarism Checker
LogoAI Paraphraser
LogoAI Quiz
LogoAI Detector
PricingBlogAbout Us
logo

Neptune Technical College Catalog System

Verified

Added on  2019/09/24

|3
|1095
|131
Project
AI Summary
The assignment is to create a prototype system for Neptune Technical College's student registration. The program will have four classes: Catalog, Major, Course, and MainClass. The Catalog class contains lists of majors and courses, and has methods to load courses and majors from files, as well as return lists of courses and majors. The Major class represents a major at the college, with attributes for the major's name, whether it is a degree program, and required courses. The Course class represents an individual course, with attributes for the course ID, name, and credit hours.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Neptune Technical College has an abysmal system for registering its students. Over the course
of the semester, we hope to implement a prototype system that will allow smoother registration.
The beginning requirement is simply to create a catalog that contains the majors offered at
Neptune (for our prototype, a very small number) and the classes that are required for each
major. For now, we will consider all courses ‘required’; we will not consider electives for this
program.
The program is fairly simple. There will be four classes: Catalog, Major, Course and MainClass
(of course). These classes will be populated by reading the information from two different files,
one for the majors, the second for the courses. Later programs will read in information for
students, instructors and sections being taught in a term.
Implementation notes:
Minimum requirements for a grade of C:
The three classes representing the catalog and its contents should have the following attributes
and functionality.
Course – this class simply represents a course, e.g. CPT-237. It is extremely simple, having
only three attributes:
courseId – a final String that is the id of the course, e.g. CPT-237
name – a final String that is the name of the course, e.g. Advanced Java
hours – a final integer that is the number of credit hours for this course, generally this
will be three
Since all three of these variables are final, there should be getters (accessors) but no setters
(mutators).
Major – this class represents a given major at Neptune. Initially it will have the following:
name – a final String representing the name of the major, e.g. Computer Programming
isDegree – a final boolean that indicates whether this is a degree program; if this is false,
the major is a certificate
requiredCourses – an ArrayList of courses that are required for this major
This class will have getters for the name and isDegree fields. In addition, it will have the
following two methods.
addRequiredCourse – this method accepts a course id as a String
getRequiredCourses – this method returns a list of the courses required for this major
Catalog – this class contains all of the majors and courses offered at Neptune. The class will
have a static member, theCatalog. The constructor for this class will set theCatalog to this. The
Catalog class consists of two ArrayLists.
courses – a list of Course objects

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
majors – a list of Major objects
In addition, it will have the following methods:
getCatalog – returns theCatalog, which is set in the constructor
getCourseList – returns a list of all courses in the catalog
getMajorList – returns a list of all the majors in the catalog
getCourseById – accepts a String that represents a course id and returns the
corresponding Course object
loadCourses – accepts a String that represents the path to a file that contains a list of
courses. The file contains comma separated values for course id, course name and credit
hours. Each line will represent a single course. For example:
CPT-237,Advanced Java,3
IST-298,Special Topics,4
The method should open the file, read in the courses adding them to the courses list. It
should close the file when all of the courses have been added.
loadMajors – accepts a String that represents the path to a file that contains a list of majors. The
format looks like this:
Computer Programming,true,CPT-167,CPT-187,CPT-172,CPT -242,CPT-237,CPT-244
Database,false,CPT-167,CPT-172,CPT-242,IST-272
For a grade of C, you may read only the first line of the file. The loadMajors method
should report an error if a course id cannot be found in the list of courses, but it should
not halt the program or the loading of courses. You may assume that there will be no
duplicate course ids for the first major.
MainClass – the main loop lives in this class; it will do the following:
Instantiate a Catalog object.
Call loadCourses to load the list of courses
Call loadMajors to load the courses for the Computer Programming major.
Print the id and name of all the courses offered at Neptune
Print the list of required courses (name and id) for the Computer Programming major.
Additional requirements for a grade of B:
Modify the loadMajors method such that reads and processes the entire ‘majors’ file. The
method should instantiate a new Major for each line and place that object into the majors list.
You can assume that there will not be duplicate majors. You should handle invalid and
duplicate course ids. Neither error should halt the program. Instead, simply report the problem
and continue. If you get a duplicate, you should not add a second entry it to the requiredCourses
list. You may want to add a method to the Major class to check whether a course already exists
in the Major.
Document Page
Modify the main method such that it prints each major and its corresponding courses. These
should be displayed in some easily readable format.
Additional requirements for a grade of A:
Modify the Catalog class such that it is a singleton.
Add a getRequiredHours method to the Major class. This method should return the number of
hours required to achieve the degree or certificate. Note that you cannot merely multiply the
courses by three since some may be worth other credit hours. You may want to have another
field in the Major class (make certain you keep it up-to-date). You could calculate this each time
the method is called, but this is a bit inefficient.
When displaying the Majors and their required courses, sort the list of majors by their names,
sort the Courses by their course id (not name). Also, when displaying the name of the major,
include the number of credit hours required to complete the major.
1 out of 3
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]