Reference no: EM132277557
Brief
A Technical School certifies students who successfully complete a course of study involving a variety of taught, self-study or project modules. To determine whether or not a student is certified, their transcript is checked against a certification criterion. For this assignment, you will individually develop classes to store data for modules, students and their transcripts. You will demonstrate the functionality of your code on sample transcripts.
Programming Methodology
The Module Class
The Module class maintains instance variables for type, title, code and level. The type is an enumeration with four values corresponding to the type of modules available: taught, self-study, project and client project. The level is an enumeration containing three level values. All instance variables are private with get and set methods. There is one constructor to initialise module object and is provided with input for all instance variables. The Module class should override the toString method to return a nice text representation.
The Technical School Class
The Technical School maintains the Semester 1 Module Offerings Table:
Module Type
|
Title
|
Code
|
Level
|
Taught
|
Programming
|
PROG101
|
1
|
Taught
|
Statistics
|
STAT102
|
1
|
Taught
|
Database Design
|
DATA222
|
2
|
Taught
|
Object-Oriented Programming
|
PROG202
|
2
|
Taught
|
Information Systems
|
INSY313
|
3
|
Taught
|
Web Services
|
WEBS332
|
3
|
Self-Study
|
Technology Applications
|
TECH103
|
1
|
Self-Study
|
Theory of Computation
|
THEO111
|
1
|
Self-Study
|
Model Checking
|
MODC233
|
2
|
Self-Study
|
Topology
|
TOPG233
|
2
|
Self-Study
|
Logic
|
LOGI321
|
3
|
Project
|
Web App Dev
|
PROJ399
|
3
|
Client Project
|
Great Code Company
|
EXTO396
|
3
|
Instantiate the appropriate Module object using data from the Semester 1 Module Offerings Table as input parameters. One suggestion is to create the method staticprivateModule[] semesterOneModuleOfferings(), which returns a primitive array populated by 13 Module objects, corresponding to each row of the table.
TechnicalSchool maintains a private instance variable Module[] offerings and the default constructor TechnicalSchool() sets this.offerings = TechnicalSchool. semesterOneModuleOfferings(). Write a get method for this.offerings.
TechnicalSchool has a public method to search the offerings array and return a module with the matching code. The method signature is Module lookup(String code).
The Grade Enumerated Type
Create an enumerated type Grade, which maintains a list of Grade values with associated boundaries for each mark: A+ ≥ 90%, A ≥ 85%, A- ≥ 80% B+ ≥ 75%, B ≥ 70%, B- ≥ 65% C+ ≥ 60%, C ≥ 55%, C- ≥ 50% D < 50%. Each Grade should contain two instance variables indicating the range of each letter grade, as well as a boolean to indicate if the grade is a pass (greater than or equal to 50%). Write a method with signature booleanisPass() which returns true if the Grade is a pass and false otherwise.
The Result Class
The Result class stores Module and Grade objects. Write an appropriate constructor to initialise both instance variables. Write get and set methods and a toString method.
The Student Class
The Student class maintains an array of results, called a transcript. The class declares astudent name, a private final static integer that sets the maximum size of the array (e.g.
MAX_TRANSCRIPT_LENGTH = 20) and an instance variable called numberOfResults, which maintains the number of results available for the student. Complete the Student class with the following methods:
• constructor, Student(String) initialises name and transcript as a new array
• void addResultToTranscript(Module,Grade), creates a Result object and adds it to the end of the transcript and updates numberOfResults. If the transcript is already full, do not add the result.
• Result[] getTranscript() returns an array of Result objects. The returned array should not contain any null entries; e.g. it is of length numberOfResults.
Certification Algorithm
The certification algorithm is a method in the TechnicalSchool class. It takes a Student object as an input and examines his transcript to determine if he is certified, according to the following criteria:
• at least three modules passed at level 1, either taught or self-study AND
• at least three modules passed at level 2, more than one must be self-study AND• at least four modules passed at level 3, at least two must be taught AND
• at least one project module passed (either of project or client project).
Complete the method and returns true if the student satisfies ALL ofthe above four criteria and false otherwise.
The StudentEvaluation Class
The StudentEvaluation class has been supplied to you and contains a main method and four static methods. Each method returns a Student object populated with results from the Transcript Tables below. To test and demonstrate your implementation of the certification algorithm, uncomment the methods in the StudentEvaluation class to print out the result for students Robin, Kate, Axel and Jim.
Transcript for Robin
PROG101 C
DATA222 C
INSY313 C+
WEBS332 C+
TECH103 C+
MODC233 C-
TOPG233 C- PROJ399 A+
false
|
Transcript for Kate
PROG101 A+
STAT102 A- TECH103 B+
MODC233 A
TOPG233 C
DATA222 A
INSY313 B+
WEBS332 A-
PROJ399 B EXTO396 B true
|
Transcript for Axel
PROG101 B+
STAT102 C
DATA222 A
INSY313 A- WEBS332 A
TECH103 D
MODC233 B
TOPG233 B
PROJ399 C- EXTO396 C
false
|
Transcript for Jim
PROG101 A
STAT102 B+
DATA222 C+
PROG202 C
INSY313 C
WEBS332 C+
TECH103 C-
THEO111 D
MODC233 A+
TOPG233 A LOGI321 B
PROJ399 B- EXTO396 A+ true
|