Parking Permit Program

 

Overview:  A high school is working on their policy to allow parking permits.  Students can only get parking permits under certain conditions.  You’ll create a program that determines whether the student is eligible or not.

 

Background: 

 

Each student’s class standing is determined based on the number of credits they’ve earned according to the following table. 

 

Credits earned

Class Level

0 – 50

Freshman

51-100

Sophomore

101-150

Junior

150 +

Senior

 

Each student earns honor points based on their grades.  A student’s cumulative GPA is determined by dividing total honor points by credits earned.  (If Johnny has 34 honor points and 10 credits, his GPA is 3.4).

 

A student is allowed a parking permit only if one of the following conditions are met:

 

Specifics:

 

Your program should always ask the student’s name and number of credits.

 

Use an if statement to determine the class standing of the student.  After you know their grade, you can use a switch statement to handle each grade.

 

This program uses nested structures (if’s within if’s).  Remember using these from QBASIC; it isn’t much different.  You should TAB or indent your nested structures.

 

Based on the class level of the student, you may need to calculate their GPA.  Based on the class level and GPA, you may need to find out if they are in an extracurricular activity.  Only perform these calculations or ask these questions when necessary.  (If your program finds that the student is a senior, you don’t need to calculate their GPA or find out if they are in an extracurricular…If they are a junior with a 3.3 or above, you don’t need to know if they are in an extracurricular…etc.)

 

The final output of the program should look like this:

 

Parking Permit for <student name>

Class:  Junior (or whatever)

Parking permit request GRANTED   (or Parking permit request DENIED)