Use the appropriate parameters to pass information

Assignment Help Operating System
Reference no: EM13948300

You receive a file that contains female and male student GPA's 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.

When creating this program please write the program so that the function main, in addition to the variable declaration, is merely a collection of function calls. Your program should use the following functions:

a. 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.

b. Function initialize: This function initializes variables such as countFemale, countMale, sumFemaleGPA, and sumMaleGPA.

c. Function sumGrades: This function finds the sum of the female and male students GPAs.

d. Function averageGrade: This function finds the average GPA for female and male students.

e. Function printResults: This function outputs the relevant results.

f. There can be no global variables. Use the appropriate parameters to pass information in and out of functions.

Reference no: EM13948300

Questions Cloud

Calculate the unit cell edge length : Calculate the unit cell edge length  for an 80 wt% Ag-20 wt% Pd alloy. All of the palladium is in solid solution, the crystal structure for this alloy is FCC, and the room temperature density of Pd is 12.02 g/cm3.
Give a brief definition of sequential file processing. : Develop an example to illustrate your definition. (The example does not have to be as elaborate. Just a record with a simple explanation)
Identify the type of products or services company provides : Describe the company you chose (give an overview/history). Examine the company's core business/industry (also identify trends) and Identify the type of products or services the company provides (describe the problems these products/services solve)
Compute the nc equipments accounting rate of return : Compute the NC equipment's accounting rate of return. Compute the investment's net present value, assuming a required rate of return of 10 percent. Compute the investment's internal rate of return.
Use the appropriate parameters to pass information : When creating this program please write the program so that the function main, in addition to the variable declaration, is merely a collection of function calls. Your program should use the following functions
Corrosion prevention measures : Suggest an appropriate material for each  of the following applications, and, if necessary, recommend corrosion prevention measures that should be taken. Justify your suggestions.
Prepare a perceptual map for your chosen product : Identify the important attributes for your chosen product and select two key variables for your perceptual map. Prepare a perceptual map for your chosen product/brand and using a minimum of seven competitors, rank each product/brand on the two va..
Small businesses generally need more marketing : Research the steps entrepreneurs on restricted marketing budgets can us to market their companies' products and services. Provide in-text citations for your sources.
Define a one-to-many relationship between tables : Use the Find command to move to the record with the Firm# 1142 and delete the record. Answer Yes to any warning messages about deleting the record.

Reviews

Write a Review

Operating System Questions & Answers

  Explain "information architectures" concept in detail

At the least, you need to iterate the questions a couple of times for yourself. Write down your answers, then set them aside for a couple of days and come back to them. If you can do this a couple of times, you'll find that your formulation will b..

  Crontab script for various jobs

Construct a crontab to perform tasks given below at the frequencies specified. Run a backup script named local-backup from the /usr/local/adm directory every weekday at 11:30pm.

  Asymmetric encryption algorithm

Discuss and explain how the asymmetric encryption algorithm can be used to achieve the following targets:

  Power management settings in bios

Every day at 2PM a client's computer at work reboots itself. You have made sure the power management settings in the BIOS and in the Windows Control Panel are not responsible.

  Question about database management systems

Assume you are a DBA staff member. determine what data dimensions would you describe to top evel managers to get their support for data administration function?

  The number of data items being manipulated

A function of n, the number of data items being manipulated. For each expression, determine the dominant term and then classify the algorithm in big-O terms.

  Identify an operating system and application combination

Identify an operating system and application combination, and discuss at least 2 cluster implementation models supported. Identify and discuss the advantages and disadvantages of the implementation of the models you suggested

  What should you know about website privacy

Deleting items never really gets rid of them. After reading this week's course materials, describe what Internet users should know about one of the following topics: What should you know about website privacy?

  Explain what can be done to prevent race condition

Suppose shared bank account exists between husband and wife and concurrently husband calls withdraw() function and wife calls deposit(). Explain how race condition is possible and what might be done to prevent race condition from occuring.

  Propose a design for the implementation of client operating

You are the Chief Information Officer (CIO) of a medium sized business that provides an online data base to Internet subscribers. By then end of the current business quarter, you must propose a design for the implementation of client operating sy..

  Protecting the company data

Suppose you work for a small, one office loan business. Your data is critical, and a fire or other disaster could destroy all of your computer documents.

  Managing contention for shared resources

Case Study - Managing Contention for Shared Resources On Multicore-Processors, Examine the authors' findings. (The authors ran three (3) applications (Soplex, Sphinx, and Namd) to test memory contention problems when different pairings of these app..

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