0% found this document useful (0 votes)
30 views2 pages

Assignment2 Spring2011

The document describes tasks for a C++ program to implement classes from a class diagram. The tasks are: 1) Allow the user to input a file name containing student information. 2) Allow the user to add a new student to a class by validating the data and saving to the input file. 3) Display all student information from the input file. The class diagram defines attributes for each student like username, full name, grade, and class with certain character limits and data types.

Uploaded by

Việt Anh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Assignment2 Spring2011

The document describes tasks for a C++ program to implement classes from a class diagram. The tasks are: 1) Allow the user to input a file name containing student information. 2) Allow the user to add a new student to a class by validating the data and saving to the input file. 3) Display all student information from the input file. The class diagram defines attributes for each student like username, full name, grade, and class with certain character limits and data types.

Uploaded by

Việt Anh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 2

You have a class diagram as below picture:

Note:

m_UserName: no more than 20 characters. m_FullName: no more than 50 characters. m_Grade: is exactly 16 characters. m_ClassName: is exactly 6 characters m_No : an integer greater than 0 and less than 99999

Write a C++ program to implement these classes, and do the below tasks: 1. Enter file name
2. Add new Student to a class 3. List all student in a class

Tasks 1:
Allow user to input name of file that contains information of all students in a class.
1

Task 2:
Allow user to add new information of a student to the class. After check validation of all data, save this information into file that was inputted in task 1.

Task 3:
Display all information of the class in file that was inputted in task 1.

Sample data:
SE0518

No 00674 00923 01479 01510 01520

UserName tamnx00674 hungnl00923 thinhvv01479 viennv01510 dungpa01520

Full Name Nguyen Xuan Tam Nguyen Lam Hung Vu Van Thinh Nguyen Van Vien Phan Anh Dung

Grades AAADDACCADAABBDD ADAABACCADAABCAD BBAADDCCADABABDD CCCABACCADCADBDD ABBBADCCADACCBDD

You might also like