M
mazenbakry
hi...i need some help on my homework, ...i tried to compile it...but i
faced alot of errors, can anyone slove it or at least give me a general
idea..i'm so confused.
------------------------------------------------------------------------------------------
·Load a list of available courses from a text file into an array (max
4 courses).
File format can be like this:
C310211
Programming II
700
C310453
JAVA Programming
600
Where: C310211 is course ID, Programming II is course Name and 700 is
course Price.
· Display the following menu:
1: Register a student.
2: List all students (IDs & names only).
3: Display one student's details (ID, name, registered courses &
total due).
4: List all students and the courses they are registered in (no due
amount).
0: Exit.
· Maximum number of students that can be registered is 3.
· To register a student (menu option 1):
- Prompt the user to enter student's ID, first name and last name.
- Display a numbered list of available courses to the user to choose
from.
Student must register at least in 1 course and at most in 3 courses.
- Prompt user to select one of the listed courses.
- When registration is done, re-display the above menu.
· To display a student's details (menu option 3):
- Prompt for student's ID
- Display student information
Important Notes: please read
- This project is from 10 marks.
- Your program must use at least 3 classes and one inheritance.
- Do NOT use the functions get() and getline() to read input from user.
You can use
them when reading the courses file
- Your program must accept input and display output exactly as shown in
the
program run below. Same sequence is required. I am going to use
automated
input to test your program. If your program fails the automated test
you loose 2
marks.
- You must use header files as I showed you in the lab/tutorial.
- Submit your own program. Duplicates will get zero.
- You must submit your project on Dec 13, 2006.
- To submit your work, do the following:
- On your computer, create a folder has a name equal to your
student's ID +
your name.
- Put all your files (hpp and cpp) inside that folder and compile
them.
- Go into the Debug folder and delete all files except EXE or
application file.
- Use Winzip or Winrar to compress your folder and create one file
that has
the same name of your folder. Make sure you select the "Include
sub-
folders" option before you compress your folder. Otherwise, I will
get an
empty folder and you get a zero.
- Submit your compressed file through the MOODLE system.
- Below is a program run. Make sure your program runs exactly like
this:
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 1
Enter student's ID, first name and last name:
1234 yasser mohammad
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 1
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 2
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 0
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 1
Enter student's ID, first name and last name:
5678 sami abdullah
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 2
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 3
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 4
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 2
Student's id: 1234 Name: yasser mohammad
Student's id: 5678 Name: sami abdullah
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 3
enter student's id: 5678
Student's id: 5678 Name: sami abdullah
30101 JAVA How to Program 300
30102 Mathematics I/CS 280
30103 English language 250
--------------------------------------------------
Total Due: 830
--------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 4
Student's id: 1234 Name: yasser mohammad
30100 C++ How to Program
30101 JAVA How to Program
Student's id: 5678 Name: sami abdullah
30101 JAVA How to Program
30102 Mathematics I/CS
30103 English language
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 0
faced alot of errors, can anyone slove it or at least give me a general
idea..i'm so confused.
------------------------------------------------------------------------------------------
·Load a list of available courses from a text file into an array (max
4 courses).
File format can be like this:
C310211
Programming II
700
C310453
JAVA Programming
600
Where: C310211 is course ID, Programming II is course Name and 700 is
course Price.
· Display the following menu:
1: Register a student.
2: List all students (IDs & names only).
3: Display one student's details (ID, name, registered courses &
total due).
4: List all students and the courses they are registered in (no due
amount).
0: Exit.
· Maximum number of students that can be registered is 3.
· To register a student (menu option 1):
- Prompt the user to enter student's ID, first name and last name.
- Display a numbered list of available courses to the user to choose
from.
Student must register at least in 1 course and at most in 3 courses.
- Prompt user to select one of the listed courses.
- When registration is done, re-display the above menu.
· To display a student's details (menu option 3):
- Prompt for student's ID
- Display student information
Important Notes: please read
- This project is from 10 marks.
- Your program must use at least 3 classes and one inheritance.
- Do NOT use the functions get() and getline() to read input from user.
You can use
them when reading the courses file
- Your program must accept input and display output exactly as shown in
the
program run below. Same sequence is required. I am going to use
automated
input to test your program. If your program fails the automated test
you loose 2
marks.
- You must use header files as I showed you in the lab/tutorial.
- Submit your own program. Duplicates will get zero.
- You must submit your project on Dec 13, 2006.
- To submit your work, do the following:
- On your computer, create a folder has a name equal to your
student's ID +
your name.
- Put all your files (hpp and cpp) inside that folder and compile
them.
- Go into the Debug folder and delete all files except EXE or
application file.
- Use Winzip or Winrar to compress your folder and create one file
that has
the same name of your folder. Make sure you select the "Include
sub-
folders" option before you compress your folder. Otherwise, I will
get an
empty folder and you get a zero.
- Submit your compressed file through the MOODLE system.
- Below is a program run. Make sure your program runs exactly like
this:
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 1
Enter student's ID, first name and last name:
1234 yasser mohammad
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 1
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 2
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 0
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 1
Enter student's ID, first name and last name:
5678 sami abdullah
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 2
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 3
Available courses:
1 30100 C++ How to Program
2 30101 JAVA How to Program
3 30102 Mathematics I/CS
4 30103 English language
Please select a course to register in (0 to finish): 4
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 2
Student's id: 1234 Name: yasser mohammad
Student's id: 5678 Name: sami abdullah
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 3
enter student's id: 5678
Student's id: 5678 Name: sami abdullah
30101 JAVA How to Program 300
30102 Mathematics I/CS 280
30103 English language 250
--------------------------------------------------
Total Due: 830
--------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 4
Student's id: 1234 Name: yasser mohammad
30100 C++ How to Program
30101 JAVA How to Program
Student's id: 5678 Name: sami abdullah
30101 JAVA How to Program
30102 Mathematics I/CS
30103 English language
------------------------------------------------
1: Register a student.
2: List all students.
3: display one student details.
4: List all students & registered courses.
0: Exit.
Enter your request: 0