Results 1 to 2 of 2
- 03-13-2008, 12:28 PM #1Member
- Join Date
- Mar 2008
- Rep Power
need help to write Program in JAVA
Create a class call it Student that will contain the student information and the appropriate methods to manipulate student info.
The student information should include the following:
Student home phone number
Student mobile phone number
Date of birth
Write a client program that is menu driven. It should display the following menu for the user:
Select your choice:
1- Fill the list with student info.
2 - Add a new student to the list.
3 - Update the information of a given student.
4 - Delete a student from the list.
5 - Display the information of a given student.
6 - Display the information of all the students.
Implement the list using Vector.
If the user selects 1 from the menu, if the vector was not created, the program should create the vector and fill it with the information of all students from the keyboard. If the user selects 1 from the menu and there was a vector created, then the program should display a warring message for the user: “this action will erase the content of the current list, are you sure you want to erase the current list Y/N? ”. If the user enters Y or y a new vector should be created and filled with data from the keyboard. If the user enters N or n, nothing should be done.
After the user enters the data, the program should sort the vector according to student ID. Use one of the sorting algorithms that we have seen in the lecture.
If the user selects 2 from the menu new student should be added to the vector in its proper location. (DO NOT add to the end of the vector and then call a sort method)
If the user selects 3 from the menu, the program should ask the user for the student id and if the student exists in the list, the program should display for the user a menu with two choices:
1- Update the name.
2- Update the home phone number.
3- Update the mobile phone number.
And let the user enters the new data and do the update.
If the user selects 4 from the main menu, the program should ask the user for the student id and if the student exists in the list, the program should delete this student from the list.
If the user selects 5 from the main menu, the program should ask the user for the student id and if the student exists in the list, the program should display the information of this student on the screen.
If the user selects 6 from the main menu, the program should display the information of all students on the screen.
If the user selects 7 from the main menu, the program should terminate.
E-mail : email@example.com
- 03-13-2008, 01:28 PM #2
I am not saying that that looks like your assignment or sating that you are in college.... But, Are you sure you have totally failed to start even a bit of this Homework?
At least if there was some bit of code and exceptions thrown, I would be compelled to help. At least try something and we assist, else we release degreed 'non-programmers'
- By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM
- By sacr83 in forum NetworkingReplies: 1Last Post: 02-15-2008, 04:07 PM
- By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM
- By mdthahir in forum New To JavaReplies: 2Last Post: 08-07-2007, 07:22 PM
- By mdthahir in forum NetworkingReplies: 1Last Post: 07-27-2007, 05:46 PM