App 21 01: Student Enrolments - g17s/BlueJApps GitHub Wiki
App21-01 Student Enrolments
Description
This app is modelled on the way BNU (Bucks New University) works, and this is similar to most universities in the uk.
See BSc Awards
A Student can enrol on a Course. The Course class stores the course code and the title of the course, and the Student class stores the students ID and name. Java code already exists for most of the features. but this code must be tested.
Codes or IDs are commonly used whenever you have many items (students, courses, modules) which might have similar or identical names. They are an essential part of the way relational database work. They have to be unique values, and ideally should be easy to recognise.
Testing Requirements Stage 1
Document your testing by selecting View -> Show Terminal in BlueJ and then Select Options -> Record Method Calls. When the testing is complete save to a txt file as "Tests01.txt" in your App-211 folder. Ensure that Clear screen at method call is off.
- Create a new Course object called "computing" for example
- Set the BNU Course code (see below) and the course title to your own course title for example "BSc Computing".
- Print the course details.
- Create a new student object with your name and your student id.
- Print out the details the student object.
- Enrol the student on the Course.
- Print out the details of the student's course
- Screen shot your object bench at the end of testing and save the file in your app211-enrolments folder.
- Save your terminal window output to a txt file as "Tests01.txt" in your App-211 folder.
Course Code | Course Title |
---|---|
BT1CTG1 | BSc Computing |
BT1CWD1 | BSc Computing & Web |
MT1CYS1 | BSc Cyber Security |
BT1GDV1 | BSc Games Development |
BT1IGP1 | BSc Games Production |
BB1ARI1 | BSc Artificial Intelligence |
BT1SFT1 | BSc Software Engineering |
BB1DSC1 | BSc Data Science |
BB1BMI1 | BSc Business Management |
Test Stage 1:
New Requirements
- A new class called Module
- Variables for the code, title and credit value for a Module
- Methods to get the value of those variables
- A method to set a value for the module's credit.
- A method to print all the details of a module.
- A new variable so that a course can contain one module
- A method in the course class to add a module to a course.
- A modified Course print method that prints the details of the course and the module
Testing Requirements Stage 2
- Create a new module with code "CO452" and title "Programming Concepts"
- Print out the details of this module (credit should be 0)
- Set the credit for this module to 15
- Print out the details of this module again
- Print out the course's module details (exception thrown!)
- Add this module as part of the course
- Print out the details of the course's module
Test Stage 2:
This is produced using the BlueJ extension called UML Class Icons just to show the difference between a full UML class diagram and the simple class diagram produced by BlueJ.