Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program needs to be in C Please us team.c code as reference: #include extern int low_grade; extern int med_grade; extern int upper_grade; extern int high_grade;
Program needs to be in C
Please us team.c code as reference:
#include
extern int low_grade; extern int med_grade; extern int upper_grade; extern int high_grade;
extern int design; extern int material; extern int assembly;
int design_team(int budget) { int score = 0; // printf("budget is %d ", budget); if (budget
int material_team(int budget) { int score = 0; // printf("budget is %d ", budget); if (budget
int assembly_team(int budget) { int score = 0; // printf("budget is %d ", budget); if (budget
In the main function, this program will receive customer's budget If customer's budget is less than $450, this program will ask user to re-enter their budget. If user enter $0, this program will exit. Customer's budget will be provided to each division as follows Company mark-up (profit) 40% Material Cost 45% Design team 5% Assembly team 10% Once each team receive their budget, they will return grade of their work (1 - 5); where 5 is the best quality Your team has written their code and put them in team.c file. You are not allowed to touch/make any change in their codes. Write a main function to call your team's functions and get score of each department from their code. Calculate average score of current budget by using the following equation design team + material team + assembly team Total score = Create a function name record in a new file (mycode.c). This function will keep scores from design team, material team, and assembly team every time user enters a valid budget Create another function called print_record. This function will print the following information for each department before exit a program (user enters $0 in their budget) average score in their record number of time that they got max score number of times they receive min score Please enter your budget: 100 Your budget is too low. Please enter your budget: 1500 score of design team is 4 score of material team is 4 score of assembly team is 3 Average score of this product is 3.66667 Please enter your budget: 450 score of design team is 1 score of material team is 1 score of assembly team is 1 Average score of this product is 1, Please enter your budget: 5000 score of design team is 5 score of material team is 5 score of assembly team is 5 Average score of this product is 5 Please enter your budget: 600 score of design team is 2 score of material team is 2 score of assembly team is 1 Average score of this product is 1.66667, Please enter your budget: 0 Design Department: Average score is 3 Design Department got max score for 1 times Design Department got min score for 1 times Please enter your budget: 900, score of design team is 3 score of material team is 3 score of assembly team is 2 Average score of this product is 2.66667 Material Department: Average score is 3 Material Department got max score for 1 times Material Department got min score for 1 times Assembly Department: Average score is 2.4 Assembly Department got max score for 1 times Assembly Department got min score for 2 timesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started