Write program to compute and outputs the average gpa

Assignment Help Programming Languages
Reference no: EM1360772

For research purposes and to better help students, the admissions office of Sharjah University wants to know how well female and male students perform in certain courses. You receive the file that contains female and male student GPAs for certain courses. Due to confidentiality, the letter code f is used for female students and m for male students. Every file entry consists of a letter code followed by a GPA. Each line has one entry. The number of entries in the file is unknown. Write a program that computes and outputs the average GPA for both female and male students. Format your results to two decimal places. Your program should use the following functions:

1. Function openFiles: This function opens the input and output files, and sets the output of the floating-point numbers to two decimal places in a fixed decimal format with a decimal point and trailing zeros.
2. Function initialize: This function initializes variables such as countFemale, countMale, sumFemaleGPA, and sumMaleGPA.
3. Function sumGrades: This function finds the sum of the female and male students GPAs.
4. Function averageGrade: This function finds the average GPA for female and male students.
5. Function printResults: This function outputs the relevant results.
6. There can be no global variables. Use the appropriate parameters to pass information in and out of functions.

Reference no: EM1360772

Questions Cloud

What will happen to that particle : At the instant of engine burnout, the rocket has risen to 52 m and acquired a velocity of 40 m/s. The rocket continues to rise in unpowered flight, reaches most height and falls back to the ground.
Compute point elasticities at prices : Compute point elasticities at prices of 5 and 9. Is the demand curve elastic or inelastic at these points.
Explain the propose two adjustments that you as : Explain the Propose two adjustments that you as a Human Resources manager can make to support the changes related to high-performance work systems
What is the optimal number of orders per year : Calculate the optimal interval in working days between orders TBO and what is the optimal number of orders per year
Write program to compute and outputs the average gpa : Write a program that computes and outputs the average GPA for both female and male students. Format your results to two decimal places. Your program should use the functions.
Assessment of ssps using quantitative reasoning and analysis : How does SSPS assess one's progress and skills using quantitative reasoning and analysis. To what extent can one use SPSS to inform one's understanding of research?
Illustrate what suggest about demand elasticity for drugs : Illustrate what does this suggest about demand elasticity for drugs. Could it be that this experiment didn't actually measure elasticity very well and that elasticity is quite large.
Estimate the value of stock : The Joe Corporation is experiencing financial difficulties. Its dividends and earnings are falling at a constant rate of 7 percent per year. Its stock just paid an yearly common stock dividend of $1.50 each share.
How much work is required to stretch the spring : How much work is required to stretch the spring. A satellite is in a low circular orbit about the Eart.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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