The Student Room Group

Computing Homework

Does anyone know how i would do this?

Registration Program
Create a program to take a register for a class of ten pupils and provide attendance statistics for the teacher.

Main Menu

1. Load students
2. Register students
3. Display attendance stats
4. Save attendance sheet

1 - Load in a pre-generated text file of student names. Ten students will suffice.

2 Allow the teacher to update the register for a whole day consisting of:

AM Reg, P1, P2, P3, PM Reg.

The teacher should be able to enter the following codes for each session:

P present
X absent
L late

3 This option should display attendance statistics for the entire class. Percentages of P, X, and L marks should be given.

Extension: Allow the user to see these statistics for each student.

4 Save an attendance sheet for the class showing the day’s marks e.g.:

Student AM Reg P1 P2 P3 PM Reg
Bill P P P P P
Stacey P P X X X
Frank L X P P P
Wendy P P L P P

Notes:
Use functions whenever possible, at the very least for each menu item. Think about how you can make your program robust.

No global variables! Your functions should take parameters and return values where required.
Reply 1
Original post by ayrdent15
Does anyone know how i would do this?

Registration Program
Create a program to take a register for a class of ten pupils and provide attendance statistics for the teacher.

Main Menu

1. Load students
2. Register students
3. Display attendance stats
4. Save attendance sheet

1 - Load in a pre-generated text file of student names. Ten students will suffice.

2 Allow the teacher to update the register for a whole day consisting of:

AM Reg, P1, P2, P3, PM Reg.

The teacher should be able to enter the following codes for each session:

P present
X absent
L late

3 This option should display attendance statistics for the entire class. Percentages of P, X, and L marks should be given.

Extension: Allow the user to see these statistics for each student.

4 Save an attendance sheet for the class showing the day’s marks e.g.:

Student AM Reg P1 P2 P3 PM Reg
Bill P P P P P
Stacey P P X X X
Frank L X P P P
Wendy P P L P P

Notes:
Use functions whenever possible, at the very least for each menu item. Think about how you can make your program robust.

No global variables! Your functions should take parameters and return values where required.


Hi what part are you unsure about?
Reply 2
all of it
Reply 3
Original post by ayrdent15
all of it


Well to start I would make a simple web page for the interface the teacher taking the register will use. The structure of the interface is up to you to design in what way you think is easy for someone to navigate it.

To store the attendance I would create a key value pair. Example in Java:Map<Date, String> attendanceRecordMap = new HashMap<Date, String>();Create a Student class which will contain all the information about a student such as their name and on here store the list of attendances for the student in question.

Create a Register class which would contain a list of students and whatever other necessary data you might need on it.

To read from the file you should research serialization / de-serialization. You can parse a file into an object in Java and vice versa. Just google this for the language you want to use its fairly simple to understand.

You can use AJAX to send requests from you web page to save / load data.

You probably want to sketch out database schema to see structurally how it will all be saved.

I hope that gives you an idea. I have been very brief so sorry if I have missed anything.

Quick Reply

Latest

Trending

Trending