Sei sulla pagina 1di 6

In this assignment, you are required to improve the program for Assignment 1 and

Assignment 2 by developing a simple Assessment Management System. The system


allows a lecturer to add and search students details and assignments. The main
program should first display a menu as follows. A lecturer needs to select an operation
from the main menu.

=======================================================
Welcome to the Student and Assessment Management System
<A>add a student assessment marks.

<S>search assessment marks for a student.

<Q>quit.
=======================================================
Please select an option from the above:

If a lecturer chooses the option <A> the program then asks them to enter a student ID,
name, Assignment 1 mark, Assignment 2 mark, Assignment 3 mark and the Final Exam
mark one by one. Once all details for a student are entered it will display the student ID,
name, the weighted mark of each individual assignment (see assignment1
specifications for how to calculate the weighted marks for the assessment items). Then
the details of the student with the weighted marks for the assessment items are added
to the end of the students.txt file. Note that the student ID should not be the same as
those already exist in the txt file and the format of the newly added record should be
consistent with that of existing records.

Once the new record has been added, the system will then ask the user 'Do you want to
enter details for another student (Y/N)?'

 If they enter 'Y', the system will allow them to enter details for another
student as before.
 If they enter 'N', the system will display the main menu again, otherwise, it
will ask the same question again.

A typical example of the display of the program (once a lecturer chooses the option
<A>) can be as follows. Your program MUST follow the same display style.

Enter the student ID: 11561234


Enter the student name: Alan Parker

Enter Assignment 1 marks out of 100: 70


Enter Assignment 2 marks out of 100: 80

Enter Assignment 3 marks out of 100: 90


Enter Final Exam mark out of 100: 95
Thank You!

The details of the student you entered are as follows:


Student ID: 11561234
Student name: Alan Parker

Weighted mark for Assignment 1 out of 10: 7


Weighted mark for Assignment 2 out of 20: 16

Weighted mark for Assignment 3 out of 30: 27


Weighted mark for the Final Exam is out of 40: 38

The record has been successfully added to the students.txt file.

Do you want to enter details for another student (Y/N)? N

=================================================================
Welcome to the Student and Assessment Management System
<A>add a student assignment marks
<S>search assessment marks for a student.

<Q>quit.
=================================================================
Please select an option from the above:

After the operation, the students.txt file will have the following content after the details of
Alan Parker are entered.
If a lecturer chooses the option <S> from the main menu then the program asks the
lecturer to enter the student ID for whom they want to see details. To facilitate the
search option you need to use an appropriate data structure such as List or Dictionary.
The program then collects the student details and assessment marks from the
students.txt file and calculate the total mark and displays them as follows (assuming the
following student was searched for).

Please enter the student ID you want to search assessment marks for: 11561234

Thank You!

A student has been found:


Student ID: 11561234
Student name: Alan Parker
Assignment 1 mark: 7
Assignment 2 mark: 16

Assignment 3 mark: 27
Final Exam mark: 38

Total marks out of 100: 88

Do you want to search assessment marks for another student (Y/N)? N

After displaying the assessment marks the program prompts the lecturer with the
following message, 'Do you want to search assessment marks for another student
(Y/N)?'

 If a lecturer enters 'Y' then the program asks them to enter the student ID for
whom the assessment marks need to be searched and displayed.
 If the lecturer enters 'N' then the program displays the main menu, otherwise,
the program prompts the same message again.

Finally, the program quits if the user chooses the option <Q>.

Your program should be able to handle invalid inputs such as not-a-number or


negative.

You need to develop the system by completing the following three tasks:

Task 1 -

Draw flowchart/s that present the steps of the algorithm required to perform the task
specified.

Task 2 -

Select six sets of test data that will demonstrate the 'normal' operation of your program;
that is, test data that will demonstrate what happens when a VALID input is entered.
Select three sets of test data that will demonstrate the 'abnormal' operation of your
program. Note that all the three features: Add and Search should be tested.

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 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.

Test Data Table

Test data Test The reason it was The output expected due to the use The screenshot of th
type data selected of the test data test data are used

Task 3 -

Implement your algorithm in Python. Comment on your code as necessary to explain it


clearly.

In addition, for this exercise, use multiple functions, instead of using a single function to
do everything. Create a good design of the functions to make the best use of the code
and avoid duplicate calculations. For example, you can have a function for calculating
the weighted mark of an assignment and the function can be used for calculating all
weighted marks. Avoid duplicate code.

You also need to design your program so that it has components that can be reused in
another program if needed. Handle exceptions appropriately. Use appropriate data
structure.

Run your program using the test data you have selected and complete the test data
table above.

Your submission will consist of:

1. Your algorithm through flowchart/s.


2. The table recording your chosen test data and results (it can be in a Word or
PDF file)
3. Source code for your Python implementation

Potrebbero piacerti anche