Ask Question, Ask an Expert

+61-413 786 465

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++

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As