A handy reference for students.

At the beginning of the academic year students are issued with a timetable to show which lessons they have each week. In this program a school week is five days, each with six lessons, but this could easily be changed.

It is helpful for students to create their own copy of their timetable as a handy reference. This program allows the user to create, save, load and output a timetable.

School timetable

Assessment

These objectives get progressively harder. Attempt as much of the program as you can in the order presented below. Remember to use a comment to describe a subpprogram, selection or iteration.

Success Criteria

Setting up and visualising the table

1 mark

You can visualise the initial timetable like this. Each row is a day 1-5 and each column is a lesson 1-6:

  1 2 3 4 5 6
1 === === === === === ===
2 === === === === === ===
3 === === === === === ===
4 === === === === === ===
5 === === === === === ===

User menu

6 marks

Edit a lesson

7 marks

Formatting the subject name

5 marks

Loading a timetable from a file

3 marks

Saving the timetable to a file

4 marks

Saving the timetable to a file

Displaying the timetable

3 marks

The output should now look like this:

1. Output timetable
2. Edit a lesson
3. Load
4. Save
5. Close
Enter choice: 1

 |-1-||-2-||-3-||-4-||-5-||-6-|
1|===||===||===||===||===||===|
2|===||===||===||===||===||===|
3|===||===||===||===||===||===|
4|===||===||===||===||===||===|
5|===||===||===||===||===||===|

1. Output timetable
2. Edit a lesson
3. Load
4. Save
5. Close
Enter choice: 2

Which day do you want to edit? 1-14: 3
Which lesson do you want to edit? 1-6: 5
Enter the subject: ENG
Lesson updated.

1. Output timetable
2. Edit a lesson
3. Load
4. Save
5. Close
Enter choice: 1

 |-1-||-2-||-3-||-4-||-5-||-6-|
1|===||===||===||===||===||===|
2|===||===||===||===||===||===|
3|===||===||===||===||ENG||===|
4|===||===||===||===||===||===|
5|===||===||===||===||===||===|

1. Output timetable
2. Edit a lesson
3. Load
4. Save
5. Close
Enter choice: 5

Good programming practices

2 marks

Maximum mark: 31

If you score less than 25 you need more practice at levels 1-9 before you continue to the next level.

Restricted automated feedback

Automated feedback for this assignment is still under construction. Submitted programs are checked for syntax errors and their source code is checked for potential errors, bugs, stylistic issues, and suspicious constructs. However, no checks are performed yet to see if the program correctly implements the behaviour specified in the assignment.