Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi , please solve this question [ But after i put the black line ]. Thank you . In this phase, you first need to

Hi , please solve this question [ But after i put the black line ].
Thank you .
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
In this phase, you first need to define: 1- constant called MAXSIZE (max number of students stored) equal to 100. 2- global variable called size =0 The main function should define the following arrays: 1. Define two array in the main function for password checking, the first array is pass[10] and the second is password[10). The first one is to store the password that you read from user and the other one is to save the permanent password. Once the user run your program, you should ask him/her to enter the password and check if it is correct or not. You can check by comparing the entered password (pass[]) with the saved cone (password[]) using strcmp function. you should allow the user to use the system and all menus once he entered a correct password, otherwise ask him to enter the password again. (the user is allowed to enter the password three times only) 2- char names[MAXSIZE][100); 3- int stdID[MAXSIZE) 4- double phones[MAXSIZE); 5- int registration Year[MAXSIZE); you now need to implement the major parts of the functions you created in phase one as follows: void displayMainMenu(); This function will remain similar to that in phase one with one minor addition which is the option: void upload Students File (char names [], int stdID II, double phones (1, int registration Year (I); This function will receive the arrays containing the students id numbers, names, phones and registration year as parameters. The function will open a file called students.txt for reading and will read all the students info (name, id, phone and registration year) and store them in the arrays. The global variable size should be set to the number of students read from the file and stored in the array. void createNewAccount (char names [], int stdiD [], double phones [], int registration Year (I); This function will receive the arrays containing the id numbers, the phones, names and the registration year. The function will check to see if the list is not full. If list is not full ( size MAXSIZE) then it ask the user to enter a name, an id number, a phone and the registration year and will have one of three choices: 1. if the id number is already in the list (the student with that id exists) it will display an error message ("student already exists"). 2- If the id number does not exist, the function will add the student's name, id, phone and registration year to the end (at index size) of the all arrays. The global variable size should be incremented (size++). void removeAccount(char names (1, int stdID (.double phones (.int registration Year (1); This function will receive the arrays containing the id numbers, the phones, names and the registration year as parameters. The function will check if the list is 2 not empty. If it is not empty (size > 0) then it will search for the id number to be removed and if not found will display an error message. If the id number exists, the function will remove it by deleting the id number, the phone, name and the registration year from the arrays and size will be decremented by 1. void view Studentinfo (char names [], int stdiD [], double phones [], int registration Year (I); This function will receive the arrays containing the id numbers, the phones, names and the registration year as parameters. The function will check if the list is not empty. If it is not empty (size > 0) then it will ask the user to enter an id number and will search for that id number. If the id number is not found, it will display an error message. If the id number is found then it will be displayed along with the name, phone and registration year in a suitable format on the screen. void editStudentInfo (char names [], int stdiD ], double phones [], int registration Year [); This function will receive the arrays containing the id numbers, the phones, names and the registration year as parameters. The function will open the file called students.txt for writing and will write to that file the name, id number, phone, and registration year of each student in the arrays. void viewList (char names [], int stdid (), double phones [], int registration Year 0); This function will receive the arrays containing the id numbers, the phones, names and the registration year as parameters. This function will print the information currently stored in the arrays. 3 Items that should be turned in by each student: 1. A copy of your program code. 2. An image file of a complete run similar to the output shown on page 3. (To do this you can PrintScreen when you run your program and then paste into the paint program and then save it as an image file) 1. Turn in your project phase by coplying to assignment on ITC and attaching both your code file+ run image file 2. Your name and id number should be included in the code file as a comment. Late project phases will not be accepted for any reason

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

2. Describe the properties of the normal distribution.

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago