Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Design the following functions and call them in Main

1) int get_student_data(void): This function asks the user to enter the student ID, Quiz, Test, Recitation, Final scores etc and prints them in a file "Stu_score.txt". This function returns the number of students in the class.

2) float curv_factor(int num): num here is meant to be for the number of students in the class. This function opens the "Stu_score.txt" file and determines a curving factor for the class: if the class average of student total scores is less than 70 then the crying factor is 70/mean_class_total score, otherwise curving factor is 1.0; This function returns the curving_factor for the class.

3) char grade(float Q, float T, float curving): This function needs to be given the Quiz, Test, and also the curving factor. It calculates the grade as per our earlier logic and returns the letter Grade (A, B, C, D, or F). A: 90-100, B=80-89, C=70-79, D=60-69, F otherwise.

Main will have the following steps:

1) call int get_student_data(void)

2) call float curv_factor(int num)

3) Print on screen the value of curving factor as shown below.

4) Open the "Stu_scpore.txt" and using a for loop scan the data, and repeatedly call char grade (float Q, float T, float curving)in order to print the ID and Grades of each student in the class on the screen.

Your CODE uses three functions in the following manner:

(a) void random_gen (void): This function,

(1) Asks user input for lower and upper limits for random numbers, and Scans them.

(2) Asks user number "how many numbers to be generated?" and scans it.

(3) Opens file "Rand_num.txt" and writes "those many" random numbers in that file in one column by repeatedly calling function int rand_int (int low, int high), which uses "calendar time" as seed to generate random numbers between (low and high), including low and high.

(b) float Mean_Min_Max (int * min, int*max): This function opens file "Rand_num.txt", scans the numbers repeatedy using a while loop, finds the "largest" , "smallest" numbers in the file, and also calculates an "returns" the average of these numbers. The function uses integer pointers to convey to the main the "largest" and the "smallest" numbers in the file.

(c) The main calls function random_gen() first get user inputs and print numbers in the file. It then calls function Mean_Min_Max(„ ) to find the Mean, Minimum and Maximum in the list and prints this information on screen.

Attachment:- Functions Design Assignment.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92063793

Have any Question? 


Related Questions in Computer Engineering

Why are some nations economically strong and others

Why are some nations economically strong and others economically weak?

Titan mining corporation has 75 million shares of common

Titan Mining Corporation has 7.5 million shares of common stock outstanding, 275,000 shares of 4.7 percent preferred stock outstanding, and 160,000 bonds with a semiannual coupon rate of 5.6 percent outstanding, par valu ...

Question this assignment consists of two 2 sections a

Question: This assignment consists of two (2) sections: a project introduction and a project plan. You must submit both sections as separate files for the completion of this assignment. Label each file name according to ...

Suppose a record has the following fields in this order a

Suppose a record has the following fields in this order: A character string of length 15, an integer of 2 bytes, a SQL date, and a SQL time (no decimal point). How many bytes does the record take if: Fields can start at ...

Assume that the pizza market consists of two firms conans

Assume that the pizza market consists of two firms, Conan's and Pizza Hut. The price of a Conan pizza is denoted by Pc and the price of a Pizza Hut Pizza is P h.  Both sellers have a marginal cost of $5 for another pizza ...

What is the role of arp and how does it cause a security

What is the role of ARP and how does it cause a security concern? What is the different between global and private IP addresses? How does using NAT change a private IP address into a global IP address, and why is this so ...

Discuss 5 of the most important sql server management

Discuss 5 of the most important SQL Server Management Studio (SSMS) features. Provide references - website link, book, article, etc.

Solutions may require mathematical proofs tracing of

Solutions may require mathematical proofs, tracing of algorithms (displaying the calculations and values of variables for each iteration of the algorithm), algorithm design, and writing programs. The following submission ...

Question suppose you are the analyst charged with

Question : Suppose you are the analyst charged with developing a new system to help senior managers make better strategic decisions. What methodology would you use? How would the business strategy affect your approach? W ...

The ages of commercial aircraft are normally distributed

The ages of commercial aircraft are normally distributed with a mean of 13.5 years and a standard deviation of 8.3821 years. What percentage of individual aircraft have ages between 10 years and 16 years? Assume thata ra ...

  • 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