Design the given functions and call them in main

Assignment Help Computer Engineering
Reference no: EM131309166

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

Reference no: EM131309166

Questions Cloud

How the levels of government work together : What type of structure you see between levels of government.What functions you see at each level of government.How the levels of government work together.
Compute real gdp and the gdp price index : What are some of the problems in using fixed weights to compute real GDP and the GDP price index? How does the BEA's approach attempt to solve these problems?
Between the movement of employer-sponsored plans : High Deductible Plans: Between the movement of employer-sponsored plans to high deductible plans and the growth of healthcare exchanges, consumers have more and more responsibility for their healthcare costs.
Write an email to turn down an invitation : Write an email to turn down an invitation.- You are the purchasing manager at your firm and have received an email from Barbara Sorrels, one of your firm's major suppliers.
Design the given functions and call them in main : Design the following functions and call them in Main, 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 num..
How does a researcher locate an existing instrument : What factors must a researcher consider in selecting an existing instrument for use in a study?How does a researcher locate an existing instrument?
Create and show a basic income statement : Anticipate selling each pizza for $7.00.   Create and show a basic Income Statement/P & L Assume your deposit will be refunded. WHAT IS YOUR NET PROFIT MARGIN?
Calculate gross domestic product : In a simple economy, suppose that all income is either compensation of employees or profits. Suppose also that there are no indirect taxes. Calculate gross domestic product from the following set of numbers
Discuss about the description of the intervention : Discuss about the Description of the Intervention,Data Collection Procedures.

Reviews

Write a Review

 

Computer Engineering Questions & Answers

  What is bitlocker technology

What is BitLocker technology. Why is it used in the simulation. What are Windows Deployment Services.

  Questionyou identified use cases and considered domain

questionyou identified use cases and considered domain classes for the state patrol ticket processing system. review

  Draw a circuit diagram for the boolean function

Construct a truth table and find the minimized Boolean function to implement the logic telling the CSU staff when to approve. Draw a circuit diagram for the Boolean function.

  Questionconsider a class boulesurprise that models a

questionconsider a class boulesurprise that models a machine dispensing surprise gifts in balls. it contains an

  Find out what restrictions should be imposed

he second law (the COPA), that is more narrowly focussed and covers only communications that are made for commercial purposes on World Wide Web, is the subject of a Court injunction (also on First Amendment grounds) preventing its enforcement pend..

  Questionexplain the technical recommendation for addressing

questionexplain the technical recommendation for addressing security requirements in the overall technical design of

  1 consider the one time pad encryption scheme to encrypt a

1. consider the one time pad encryption scheme to encrypt a 1-bit message. replace the xor operation with another

  Describe a method for notifying the systems administrator

write 500 words for each of the discussion tasks. you should provide credible references for every task according to

  Decreasing risk of malicious attacks

While a large percentage of the information technology security budgets is devoted to decreasing the risk of malicious attacks, there exist other ways in which systems or data become damaged.

  Explain how this storage space works where it is located in

ram is a temporary storage space that is used to store program instructions and data. but accessing ram is inefficient

  Write a ruby program that reads a line from the user

In class assignments #12. Design a Ruby class that inherits from the inbuilt String class and adds an additional functionality to check if the string is a palindrome. Email your code by end of day 02/28.

  Demonstrate demorgan laws using a venn diagram

Demonstrate DeMorgan's Laws using a Venn diagram. Draw a Venn diagram showing the elements of sets A, B, and the universe for all 4 regions. Draw a second diagram showing only the elements of the complement of set A

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