Reference no: EM132314517
Object Oriented Design and Programming Assignment - Programming Solution
Course Learning Outcomes addressed:
Systems development and User experience -
a) To act as an ethical practitioner while demonstrating skills in data analysis, and software development & testing.
Teamwork and self-management skills -
b) To take responsibility for their own time management delivering quality required material on time in dynamically changing technological and communication contexts whether as an individual or member of a small team.
Unit Learning Outcomes addressed: Upon successful completion of this unit students should be able to -
a. Analyse and dissect simple design and programming problems.
b. Demonstrate basic knowledge of object oriented programming concepts and syntax.
c. Implement a well-designed modularised solution to small programming problems.
d. Develop and/or implement testing schedules.
Assessment Task: Individual Programming Solution to a Problem
ASSESSMENT DESCRIPTION: The NSW service is conducting a survey about Opal Card weekly usage. They have collected surveys from 4 Opal card users about their daily fare in one week so far. The daily fare of each user is as follows:
User
|
Mon
|
Tue
|
Wedn
|
Thur
|
Fri
|
Sat
|
Sun
|
1
|
8.84
|
10.2
|
7.9
|
8.8
|
6.7
|
2.47
|
|
2
|
10.1
|
8.8
|
5
|
8.58
|
4.94
|
0
|
|
3
|
5.04
|
5.04
|
4.28
|
4.28
|
5.04
|
3.52
|
|
4
|
15.15
|
13.63
|
15.8
|
6.62
|
7.06
|
4.94
|
|
Note: 1) The Sunday fare has a daily limit of $2.7 (e.g. the maximum Sunday amount is $2.7).
2) The weekly fare has a cap of $63.2 (e.g. the maximum weekly amount is $63.2).
Write a Java program that will use the above values and other similar data then generate some statistics, thus:
a) You will use a text file to read the user data (User, Mon to Sat fares).
b) You will have to create a Commuter Class with the data members and methods.
c) You will then need to store the data from the above using a file in an array of object of the commuter class.
d) You will need to add Sunday fares as input to your program.
e) Calculate total fares for each commuter and sort in descending order.
f) Save all the data to a different output text file or output the result on the screen.
OUTPUT FILE HEADER:
User Mon Tue Wedn Thur Fri Sat Sun Total
Your program must not crash. You have several options to prevent crashes:
a) use try/catch
b) use regex (regular expressions)
c) use both
Design & Test & User Documentation: Submit a Word document (3 pages) containing the following:
1. Your program design, you can use flowchart, IPO, pseudocode (not code).
2. Your test data and expected results (this means do the maths on paper first) and a test report. You should have at least three test cases.
3. A user guide, include any assumptions you make (e.g. max marks), any errors/bugs, any suggestions for future improvements.
Assignment must be submitted -
- Create a ZIP file using your ID and Name includes the following (eg. K1234567-Name.zip)
- Your class(.java) file for the class program.
- Both Java Class(.class) File (eg. Main and Class)
- Input File (.txt)
- If output to a file, then Output File (.txt)
- Word Document file (.docx).