Calculate the average of the 5 grades passed and display

Assignment Help Programming Languages
Reference no: EM13772217

Create a program that will display a menu to the user. The choices should be as follows:

1) 1) Enter 5 student grades

2) Show student average (with the 5 grades)

3) Save grades (save the 5 grades only to the file)

4) Load grades (read 5 grades from a file)

5) Exit

Use a switch statement for the menu selection and have it pick the appropriate function for the menu choices. Each option should be implemented in its own function. Initialize the grades randomly between 0-100. So if the user select show student average as their first choice, there will be some random grades in the list already.

Function1 : Ask the user for 5 grades and place them into 5 variables that should be passed in as parameters, validate that the grades are in the range between 0-100 (use a loop).

Function2: Calculate the average of the 5 grades passed in and display the average with 1 decimal place and also display the letter grade.

Average

Letter Grade

90 - 100-A

80 - 89-B

70 - 79-C

60 - 69-D

Below 60-F

Function3: Write the 5 grades to a file called "myGrades.txt" Make sure to include an if statement in case the file is not able to be opened and give an appropriate error message.

Function4: Read 5 grades from a file called "myGrades.txt". Make sure to include an if statement in case the file does not exist and give an appropriate error message.

Reference no: EM13772217

Questions Cloud

Write an essay about martin luther king junior : Write an essay about Martin Luther King Junior.
Create a simple text editor that has one large rich text box : Complete the following programming exercise (SIMPLE TEXT EDITOR WITH ONE LARGE RICH TEXT BOX). You will use the OpenFileDialog, StreamReader and StreamWriter objects; the Close, Peek, ReadLine, ShowDialog and WriteLine methods.
Critique a human resource article which study staffing : Critique a human resource article which study Staffing (recruting and selecting employees, managing employee seperations, downsizing, and outplacement) The critique must contain the following: -A brief introduction of the article -A statement of the ..
General population perceives storm watches and warnings : Over the past century, tornado deaths in the U.S. have been declining significantly. Have the number of observed tornadoes gone down as well? Is there any relationship between these two variables? What does this tell us about cause-and-effect rela..
Calculate the average of the 5 grades passed and display : Calculate the average of the 5 grades passed in and display the average with 1 decimal place and also display the letter grade.
What do you feel was the intent of the court : Please explain the plain view doctrine as it would apply to police searches of vehicles. What do you feel was the intent of the court when they created this doctrine
Higher interest rates more capital invested : Using the four scenarios, discuss each and choose periods when each scenario has occurred in the U. S. or other countries: a. higher interest rates, more capital invested b. lower interest rates, less capital invested c. lower interest rates, more ca..
Analyze the usefulness of the ideas of justice : Based on your research and the discussions so far, analyze the usefulness of the ideas of justice in lowering recidivism. Is restorative justice useful in lowering the rate of recidivism? For which types of crimes and offenders is it most useful
Four phases of demographic transition : Describe the 4 phases of demographic transition, including if the population is stable, growing, or declining in each.According to demographers, what factors lead to a decline in the crude birth rates (CBR) and crude death rates (CDR) in the epidem..

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a credit approval application for retail store

You have been asked to create a credit approval application for retail store. To get approved for credit card customer must meet the following criteria: Should be 18 years of age or older

  Create an xml document that marks up nutrition facts

Create an XML document that marks up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package.

  Assembly language program

Write a program called A2P1 to run in the LC-3 simulator. The program asks for the user to type in his or her UPI.

  Binary search algorithm to search an array

The binary search algorithm that follows may be used to search array when elements are in order. This algorithm is analogous to following approach for finding name in telephone book.

  Write a program that uses the curve class hierarchy

Write a program that uses the curve class hierarchy. The program should define several different objects, output their area, circumference, etc. It should also use the printcurve function.

  Write a program which generates 100 three-digit random

an armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number

  Evaluates and prints the value of the polynomial

Write a program that evaluates and prints the value of the polynomial ax2 + bx + c, given user inputs for a, b, c, and x using integers and floats.

  You have been hired by a school district

You have been hired by a school district to write a program that will grade multiple choice exams and providea report listing the grade (numeric and letter) for each student, the problems missed for each student.

  Prompt for user login to begin using the system

Suggest an application system which is able to perform some arithmetic computations, like commission system, encryption system, timer system, etc, from anyone of the following industry.

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

  Short memo to the vice-president of production

Write a short memo to the vice-president of production recommending whether the availability of any of the three resources (blending, purification, or labor) should be increased from current levels. If you recommend an increase, specify at most ho..

  Application to inputs five numbers given between a range

Write an application that inputs five numbers, each between 10 and 100, inclusive. As each number is read, display it only if it's not a duplicate of a number already read.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd