Reference no: EM132303211
CODING
Learning Objectives:
The learning objectives for this lab assignment are relating to knowledge and skills development:
Knowledge:
K3. Explain the object oriented principles of inheritance, polymorphism, encapsulation, dynamic binding and abstraction.
Skills:
S1. Develop object-oriented programs involving several interacting classes.
S2. Develop, compile and debug code using an appropriate IDE
S3. Manage multiple versions of source code.
S4. Select appropriate ways to represent data.
S5. Incorporate pre-written classes, including those from an API, into software solutions
Purpose and expectations
You will practise skills in reading a specification and developing functional requirements to inform your object oriented code design and development.
You will develop a multi-class program to meet functional specifications applying object oriented design principles.
You will use a GitHub repository to maintain your code, shared with your team.
Your development and design process will involve creating UML class diagrams.
You will develop your understanding of and apply object-oriented programming techniques, in particular those relating to polymorphism and using files for input/output.
You will test your code using thoughtful test cases and write some Junit tests that can be run to test your code.
It is expected that student will creatively design and author a unique system based on individual design choices that fit with the requirements listed in each task. Before you submit, read over the entire assignment and understand all the tasks. Acknowledge authors for all code that you submit using in code comments.
Requirements
This mini-assignment is due in week 9 and student must submit it in moodle. There must be evidence of regular commits of code into the team GitHub repository by all students. If there is no evidence in GitHub, then that student will be given zero marks for the assignment.
System specification
This exercise requires you to create or update a UML class diagram, to access the GitHub Classroom to download some starter code, to collaboratively discuss design and extend that code and commit changes into your source code repository. This work will build on work that you complete during your lab classes.
In your assignment 1 specification, a requirement statement was provided. This described the requirements to be addressed in a computer system that you are developing. This assignment requires you to extend that computer system and do some more extensive testing of that system. Where there is not enough information provided, you may make assumptions.
New requirements:
In the next release of the system, the college would like to have the ability to:
• allow students to enrol in multiple courses
• generate a transcript for each student that list all courses completed by a student and the results
• save the transcript to a file
• generate an invoice for each student to clearly state the fees owing. These fees owing include fees due for courses enrolled in as well as invoicing for renewal of vehicle registration for parking
• save the invoice to a file
• read input data from input text files rather than use keyboard input
The College would like to extend their existing simple prototype information system designed, with a text based menu that provides a number of options to demonstrate that the system prototype has the required functionality. The menu has the following options and you will add further menu items as necessary (e.g. to read from a file to populate data into parts of your system):
1. Add a new student data from file
2. Register a number of vehicles to a student for parking from a file
3. Create a new course offering
4. Enrol students into a course using student list in text file.
5. List details of a particular available course (name, fees, length of course).
6. Calculate parking registration renewal fee for a particular student who has previously registered a vehicle and save details to an invoice file.
7. Display a list of all students enrolled in a particular course and save to a file.
8. Display a list of all courses a student has enrolled into
9. Generate an invoice for course enrolments for a particular student and save to a file.
10. Run system tests
Option 10 will run some automatic Junit tests to verify that the system is working.
Technical requirements
Part 1:
1. Create code to generate invoices for courses enrolled in by a student and save the invoice to a text file.
2. Modify the Course class so that you use an ArrayList to store multiple students to replace the existing array studentList.
3. You must modify/add methods so that you can generate a list of enrolled students in a course, enrol a new student into a course and unenrol a student.
4. You will need to add code so that it is possible to add in results for a student in a course.
5. Write Junit tests to verify that the Course and Student class code is working as expected.
6. Write code to read in information from a text file to populate data for courses and students.
7. Add a menu option to the main menu driver class to create the course enrolment invoices and save to a file.
8. Ensure that you have used polymorphism in your code and highlight where this occurs with comments in your code
Part 2:
1. Modify the Student class so that it is possible to add multiple vehicles to be registered to a student. You may use an array or an ArrayList to store these vehicles.
2. Read in the details of vehicles to add from an input text file.
3. You must modify/add methods so that you can generate a list of registered vehicles for a student, register a new vehicle and remove a vehicle from the list of registered vehicles for a student.
4. You will need to add code so that it is possible to generate a parking renewal registration invoice for a student and save this invoice to a text file.
5. Write Junit tests to verify that the Student and Vehicle class code is working as expected.
6. Add a menu option to the main menu driver class to create the parking renewal registration invoices for all students and save to a file.
7. Ensure that you have used polymorphism in your code and highlight where this occurs with comments in your code
Part 3:
1. Modify the College class so that an ArrayList is used to store the list of courses offered by the college.
2. Read in the details of courses offered at the college from an input text file.
3. You must modify/add methods so that you can generate a list of courses offered at the college and save this to an output text file., You must have methods to register a new course and remove an existing course from the list of courses offered by the college.
4. You will need to add code so that it is possible to generate a report showing all courses currently offered and write this report to a text file.
5. Write Junit tests to verify that the College and Course class code is working as expected.
6. Add a menu option to the main menu driver class to create the college report and save to a file.
7. Ensure that you have used polymorphism in your code and highlight where this occurs with comments in your code
Designing and Documenting your system
Create a document named: In your document, you must include the following section headings:
• Authors,
• System Overview,
•Class Diagram,
• Testing.
• File Format description
• Answers to questions (to be completed by each student individually).
System Overview
In the System Overview section you are to write 100-200 words describing your system and how it could be used in an imaginary use-case scenario. You will need to review this after completing all tasks and ensure that your overview explains your entire system. State any assumptions you make.
Class Diagram
In this section, you are to provide a class diagram for every user authored class in your system. This UML class diagram may be generated by importing your code into Enterprise Architect.
Testing
As you develop your classes and methods, you will write unit tests to verify that your code is working correctly. In this section of your documentation, you will describe your initial chosen test data and explain how that data will help you test your code. Make sure that you choose a variety of test cases to ensure you can be satisfied that your code is working. Describe your test cases and include screen shots of your testing results (so far) in this section. Describe the Junit test code that you have created.
File format
In this section, describe the format of files that are required for input to your system. Ensure that you also submit an example input file to be used when running your code.
Questions to be answered in your document
For each concept listed below, provide a description in your document and provide an explanation of the concept using an example to demonstrate from your own submitted code.
1. Polymorphism
2. Exception Handling
3. Any other object oriented concept of your own choosing
Developing your system code
In completing this assignment, be guided by your previous work, lecture material and example code provided in moodle. Ensure you regularly commit your code to GitHub.
You are expected to create teams in the above GitHub classroom.
Use the following checklist to ensure you are following good practises:
1. You have demonstrated polymorphism in your code
2. You have appropriate exception handling code
3. Include at least one constructor for each class
4. Incorporate encapsulation into your design so that code (data attributes and methods) in each class only relate to the objects that will be instantiated
5. Use information hiding approaches so that you clearly identify methods that should be public and you ensure that your variables are kept private within the class
6. Where you have two or more objects that are associated, you have used correct Java coding to implement this association
7. You have appropriate get and set methods and a defined override of the toString method for each class
8. You have added other additional methods where appropriate
9. You have at least one example of a method or constructor that is overloaded
10. You have at least one abstract class that is extended with specialisation sub classes
11. You have at least one example of a method that is overriding another method
12. You have a separate test driver class that has a text based menu providing options to demonstrate that your classes are working, including an option to run Junit test cases
13. You have comments in your code naming the author of each class and describing code purpose and logic
Attachment:- Agile Coding Lab.rar