Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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

a) Function openFiles: This function opens input and output files, and sets output of the floating-point numbers to two decimal places in the fixed decimal format with the decimal point and trailing zeros.

b) Function initialize: This function initializes variables like countFemale, countMale, sumFemaleGPA, and sumMaleGPA.

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

d) Function averageGrade: This function determines average GPA for female and male students.

e) Function printResults: This function outputs the appropriate results.

f) There could be no global variables. Use the suitable parameters to pass information in and out of functions.

problem 2) prepare a program to convert time from 24-hour notation to 12-hour notation and vice versa. Your program should be menu driven, giving the user the choice of converting the time between the two notations. In addition, your program should contain at least the following function: a function to convert time from 24-hour notation to 12-hour notation, a function to convert time from 12-hour notation to 24-hour notation, a function to display the choices, function(s) to get the input, and function(s) to display the results. (For 12-hour time notation, your program should display AM or PM.)

problem 3) The cost to become the member of a fitness centre is as follows: (a) the senior citizens discount is 30%; (b) if the membership is bought and paid for 12 or more months, the discount is 15%; and (c) if more than five personal training sessions are bought and paid for, the discount on each session is 20%.

prepare a menu-driven program which determines cost of the new membership.

Your program should contain a function which displays general information about the fitness centre and its charges, function to get all of the essential information to find out the membership cost, and function to determine membership cost. Use suitable parameters to pass information in and out of a function. (Don’t use any global variables.)

problem 4) prepare a C++ function, smallestIndex, which takes as parameters an int array and its size and returns index of the first occurrence of the smallest element in the array. Also, prepare the program to test your function.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M94524
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question? 


Related Questions in C/C++

More often than not entrepreneurs will fail several times

"More often than not, entrepreneurs will fail several times before they make it and will usually learn a lot in the process. To help these entrepreneurs to succeed will require a cultural shift. We need to encourage Aust ...

Question 1you are facing the following problem you are

Question 1 You are facing the following problem: You are given a robot and your task is to "guide" the robot through a 2-dimensional maze such that the robot can reach a desired goal state. Assume that the maze is define ...

Only one programwrite a c program to find fibonacci numbers

Only one program Write a C++ Program to Find Fibonacci Numbers using Dynamic Programming.

A write an array implementation of self-adjusting lists in

a. Write an array implementation of self-adjusting lists. In a self-adjusting list, all insertions are performed at the front. A self-adjusting list adds a find operation, and when an element is accessed by a find, it is ...

Here are two examplesifcounter7continueifcounter7break1

Here are two examples: if(counter==7) continue; if(counter==7) break; 1. Write a for loop that counts only the odd numbers out of the first five numbers entered from the keyboard, but does not count (skips) the number 7. ...

Programming assignment-1 program specification1 your

Programming Assignment- 1. Program Specification 1. Your program must read 8-bit ASCII strings from standard input -- for instance, using the cin object in C++, or stdin in C. You must consume all input from standard inp ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

1 requirementsin this assignment you can unleash your

1. REQUIREMENTS In this assignment, you can unleash your imaginations and use OpenGL with C/C++ programming to produce a scene(s) that represents what you envision could possibly be seen under the sea. Please note that a ...

Ipo chartinputprocessingoutputmarks for four

IPO Chart Input Processing Output Marks for four courses Processing Item: Grade Point and Grade for individual course Overall GPA Algoritham Initialize gp with zero Repeat  for (each course)                 Enter the mar ...

Programming assignment- in this assignment you are

Programming Assignment- In this assignment you are requested to write a C++ program that displays the following colored pyramid on the screen: - The pyramid is 71 characters wide and 21 characters high. - To draw it, you ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate