back to top
Value:20%
Due Date:23-May-2021
Return Date:15-Jun-2021
Length:Group Assessment:No
Submission method options:Alternative submission method
TASK
back to topTimetable Organiser is a system that allows users to view university timetables in multiple forms including by campus, room, subject, and lecturer. The system expects the timetable data to be stored in a simple comma-separated text file with the format:
subject,activity,day,start,end,campus,room,lecturer
A sample timetable data file is shown below:
ABC101,Lecture,Monday,08:00,10:00,Jenolan,J10112,Ada Log ABC101,Tutorial,Tuesday,10:00,11:00,Jenolan,J10115,Ena Blue ACE204,Lecture,Monday,09:00,11:00,Tarana,T05201,Kin Wall ACE206,Lecture,Wednesday,13:00,14:00,Tarana,T06402,Kin Wall PRG321,Lecture,Tuesday,14:00,16:00,Jenolan,J09302,Foxy Rex PRG321,Tutorial,Thursday,11:00,12:00,Jenolan,J09212,Esk Brown
|
You are required to develop a menu-based program that implements the Timetable Organiser system. Your program should prompt the user for a timetable data file name. After the file has been successfully read, the system will interact with the user to view the timetable according to the desired selections.
Review the sample run below to clearly understand the requirements.
Timetable Organiser ------------------- Enter the timetable data file name: timetable-sample.txt ** Reading timetable data ... ** Success! Timetable menu -------------- [C]ampus [R]oom [S]ubject [L]ecturer > Enter selection or [Q]uit: L Lecturers --------- [1] Ada Log [2] Ena Blue [3] Kin Wall [4] Foxy Rex [5] Esk Brown > Enter selection: 3 Timetable for lecturer "Kin Wall": =============================================================== Subject Activity Day Start End Campus Room Lecturer --------------------------------------------------------------- ACE204 Lecture Monday 09:00 11:00 Tarana T05201 Kin Wall ACE206 Lecture Wednesday 13:00 14:00 Tarana T06402 Kin Wall =============================================================== Timetable menu -------------- [C]ampus [R]oom [S]ubject [L]ecturer > Enter selection or [Q]uit: c Campuses -------- [1] Jenolan [2] Tarana > Enter selection: 1 Timetable for campus "Jenolan": =============================================================== Subject Activity Day Start End Campus Room Lecturer --------------------------------------------------------------- ABC101 Lecture Monday 08:00 10:00 Jenolan J10112 Ada Log ABC101 Tutorial Tuesday 10:00 11:00 Jenolan J10115 Ena Blue PRG321 Lecture Tuesday 14:00 16:00 Jenolan J09302 Foxy Rex PRG321 Tutorial Thursday 11:00 12:00 Jenolan J09212 Esk Brown =============================================================== Timetable menu -------------- [C]ampus [R]oom [S]ubject [L]ecturer Enter selection or [Q]uit: q Have a nice day!
|
Your program must validate the timetable data file before proceeding. Specifically, your program must verify the following:
- each line consists of exactly eight fields separated by commas
- subject and room fields must be alphanumeric strings starting with a letter
- activity, day, campus and lecturer fields must be alphabetic strings
If any of these conditions is not satisfied, the program should display an error message and quit.
Below is a sample run when an incorrectly formatted file is provided.
Timetable Organiser ------------------- Enter the timetable data file name: timetable-sample-incorrect.txt ** Reading timetable data ... ** Error! File is not correctly formatted. Have a nice day!
|
Constraints
- You must define a function calleddisplay_timetablethat accepts a string parameter containing the selection type and a list parameter containing the selection results, and prints the table in the format shown in the sample above.
- You must use lists and string methods in your program.
- You must handle the IOError exception with a specific handler. In addition, your program must not crash regardless of the input provided.
- Your program must not import any library or module other than your own written modules (if any).
Task 1 (15 marks)
Implement your program in Python. Comment on your code as necessary to explain it clearly.
Task 2 (5 marks)
Select at leastthreesets of test data that will demonstrate thenormaloperation of your program; that is, test data that will demonstrate what happens when a valid input is entered. Selecttwosets of test data that will demonstrate theabnormaloperation of your program; that is, test data that will demonstrate what happens when an invalid input is entered or when an error is encountered.
Set it out in a tabular form as follows: test data type, test data, the reason it was selected, the output expected due to using the test data, and finally a screenshot of the output actually observed when the test data is used. It is important that the output listings (i.e., screenshots) are not edited in any way.
Data type |
Test data |
Reason it was selected |
Expected output |
Screenshot of actual output |
---|
Normal |
|
|
|
|
Normal |
|
|
|
|
Normal |
|
|
|
|
Abnormal |
|
|
|
|
Abnormal |
|
|
|
|
Run your program using the test data you have selected and complete the last column of test data tables above.
RATIONALE
back to topThis assessment task will assess the following learning outcome/s:
- be able to explain the steps involved in a disciplined approach to problem-solving, algorithm development and coding.
- be able to demonstrate and explain elements of good programming style.
- be able to identify, isolate and correct errors in all phases of the programming process.
- be able to interpret algorithms and program code.
- be able to apply sound program analysis, design, coding, debugging, testing and documentation techniques for simple programming problems.
- be able to write code in an appropriate coding language.
This assessment task is designed to reinforce topic material related to simple functions, files, exceptions and lists.
MARKING CRITERIA AND STANDARDS
back to top
Criteria |
HD |
DI |
CR |
PS |
FL |
---|
Demonstrate and explain elements of good programming style.
Recognise and is aware of the procedural programming approach.
Write code in an appropriate coding language.
Interpret algorithms and program code.
Identify, isolate and correct errors in all phases of the programming process. (15 marks) |
Python accurately implements the task and contains only necessary statements, variables and functions. All variable and function names are meaningful. All required validations are performed. All required exceptions are handled. |
Python code closely implements the task and contains only necessary statements, variables and functions. Most variable names and functions are meaningful. All required validations are performed. All required exceptions are handled. |
Python code properly implements the task, may contain unnecessary statements, variables or functions. Some variable and function names are meaningful. Some required validations are performed. All required exceptions are handled. |
Python code partially implements the task, may contain unnecessary statements, variables or functions. |
Python code does not execute properly. It may contain syntax errors and/or produce incorrect results. |
Apply sound program analysis, design, coding, debugging, testing and documentation techniques to simple programming problems. (5 marks) |
Test data comprehensively represent normal and abnormal conditions. Clear explanation is provided of the expected output of the test results. The actual results match the expected results and are reproducible. |
Test data distinctly represent normal and abnormal conditions. Correct explanation is provided of the expected output of the test results. The actual results match the expected results and are reproducible. |
Test data represent normal and abnormal conditions with some redundancy. Explanation is provided of the expected output of the test results. The actual results match the expected results and are reproducible. |
Test data represent at least one normal and one abnormal conditions. Brief explanation is provided of the expected output of the test results. The results are reproducible. |
Test data does not represent normal and abnormal conditions. No explanation is provided of the expected output of the test results. Or the test results cannot be reproduced. |
PRESENTATION
back to topYou must prepare and present all source code and test data separately and include them all in a single MS Word file identified by your name. The Python source code you write should be saved with a name such as ITC106Assignment2YourName.py and then include a copy of it as text in the MS Word file named ITC106Assignment2YourName.docx. The subject lecturer will explain to you how to insert the object to your MS Word document. Submit your .docx file throughTurnitin.
It is critically important that your test runs are unmodified outputs from your program, and that these results should be reproducible by the marker running your saved ITC106Assignment2YourName.py program.
REQUIREMENTS
back to topFollow the marking criteria and deliverable for each task. Your answers should be logical and relevant to the questions asked. Please avoid non-relevant and vague information. There is no word limit for task 2 but do not use non-relevant or vague information in your answer.
APA reference style should be used in the assignment. APA referencing guide can be found inhttp://student.csu.edu.au/study/referencing-at-csu