|
-
Mar 27th, 2000, 02:19 AM
#1
Thread Starter
New Member
Hi there,
My name is Alicia.
I have this assignment to be done by next week and I'm a bit screwed. Any help whatsoever would be GREATLY appreciated and rewarded to the best of my ability! Please don't hesitate to e-mail me.
Regards
XXX
Student Management System
Consists of designing an application that will allow a user to create and use a student details file.
The first form that the user will be presented with is the password form. This form is used to ask the user for a username and password. The username can be anything but the password must be the same as the password stored in the file “Password.txt”, which you will create yourselves. The user will have 3 attempts to get the password correct otherwise the program should end.
If the user gets the password correct, the main form will be displayed. This will have command buttons for adding a student, deleting a student, searching for a students details, getting the average score of all students and finally getting the average score for all students belonging to a particular course.
The students details will consist of the following:
Course ID – will either be C (computers), B (business) or S (science).
Student ID – is simply a number with no reference to the course. It should be generated automatically based on the last Student ID in the students file (e.g: If the last student ID is 11 then, 12 should be generated when adding a new student).
Student Name – string
Home Town – string
Age – integer
Average – integer between 0 and 100
One form will be used for adding students as above. All data should be appropriately validated and then written out to the file if there are no errors. The data should be taken in from the user via textboxes and not inputboxes. As stated before, the program should automatically generate the student ID.
The user should be able to search the Students file for the details of a particular student. The user should be allowed search using the either the Student ID or the or Student Name. If the details are found in the file they should be displayed in a form, regardless of whether or not a student has been deleted.
To delete a student, the user needs to provide the program with the student ID.
Getting the average score for all students involves reading all the average grades stored in the students file and dividing the total by the number of students. Extra marks will be given if the program takes into account students that have been deleted (they should not be included when calculating the average).
Getting the average score for all students belonging to a particular course is basically the same as the above except you will only include students of the appropriate course. Again, extra marks will be going for catering for students that have been deleted.
-
Mar 27th, 2000, 02:27 AM
#2
Lively Member
Homework
Are you looking for someone to write the whole thing or are you stuck on a particular part?
-
Mar 27th, 2000, 02:40 AM
#3
Addicted Member
You are not expecting that someone makes your homework are you ?
If you want to put some quetions feel free.
Ex.: "How can I retirve a string from a file to compare it with the result of a text box ?"
ANSWER:
Make a file "Password.txt" in your appliction path and write int it (woth wordpad for instance) "PASSWORD1CHECK"
In your project create a form w/ a label (caption: "PASSWORD:"), textbox (named "txtbox1"), a command button (Caption: "OK"; name: "Command1") and a command button (caption "CANCEL"; name: "Command2") and put the code:
'-------START CODE ---------
Public RetPass As String
Public NoOfTries As Integer
Private Sub Command1_Click()
If txtbox1.Text = RetPass Then
'Put the following code here like -close this form and open the one for the student input
Else
trash = MsgBox("WRONG PASSWORD", vbOKOnly, "ERROR REPORTED")
NoOfTries = NoOfTries + 1
End If
If NoOfTries = 3 Then End 'If someone missed the password 3 times quits the app
End Sub
Private Sub Command2_Click()
'this end the program
End
End Sub
Private Sub Form_Load()
NoOfTries = 0
Open "password.txt" For Input As #1
Input #1, RetPass
Close #1
End Sub
'-------END CODE------
I belive i pretty much made partially your homework.
Any more questions shoot...
...but please before asking try to solve it by yourself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|