C# - C Sharp: Practical 7: Marks Management System
MARKS MANAGEMENT SYSTEM
1. Create an interface name IStudentMark contains these properties and methods:
a. Properties:
- FullName (string)
- ID (int)
- Class (string)
- Semester (int)
- AverageMark (float) – Read only property
b. Methods:
void Display()
2. Create a class name StudentMark:
a. Implements the IStudentMark interface in step 1.
b. The method Display() will print all FullName, ID, Class, Semester, AverageMark.
c. Declare an array name SubjectMarkList type int has size of 5 elements.
d. Create an indexer uses the array SubjectMarkList in step 2c.
e. Create a method named AveCal to set AverageMark = average of 5 int elements in SubjectMarkList array.
3. Display a tasks menu to choose:
4. If user type 1 from the keyboard then:
a. Create a new StudentMark instance and input FullName, Class, Semester and then ask users to enter 5 subjectmarks and set to the instance indexer. The ID is auto increament (++ID ).
b. Create a Hastable (create only one Hastable only) to keep the StudentMark instance in step 4a with key = ID and value = the student instance.
5. If user type 2 from the keyboard then:
Loop from all studentmark instances in the Hastable then executes the Display() method from IStudentMark interface.
6. If user type 3 from the keyboard then:
Loop from all studentmark instances in the Hastable then executes the AveCal() method and then executes the Display() method.
7. While user not chooses Exit (type 4 from the keyboard) then go back to the menu step 3 to ask user chooses an option.