Site hosted by Angelfire.com: Build your free website today!

Program 38 

 

 


Using array of structs or classes with public:

We need to keep track of the MST students at all four UCS high schools.  You must first create a data file.  Call it UCS.dat(in common).  The name of the array will be school[].  The name of the struct will be data….struct data.  For each school have the school name, enrollment, MST enrollment, student names, principal, address, and phone number.  Have a MENU function come up to start your program with theses options…

                        School Data Menu

1)      List all school names with principal and phone number

2)      List all school names with address

3)      Individual schools’ information

4)      Quit

 

If they select 3 from the main MENU, go to a sub menu

                        School Choice

1)      Eisenhower

2)      Ford II

3)      Stevenson

4)      Utica

5)      Return to main menu

6)      Quit

 

On a school choice 1-4, go to a third menu

For example:

            Eisenhower Data

1)      Full address and phone number

2)      Principal name

3)      Enrollment

4)      List of all students

5)      Return to main menu

6)      Quit

 

 

Before the student list for each school there will be a number stored that will control how many students names to retrieve (call it school[x].enrollment).