subject

C++ You are the manager of a team of ten programmers who have just completed a seminar in structured programming and top-down design. To prove to your boss that these techniques pay off you decide to run the following contest. You number the programmers 1 through 10, based on their performance in the seminar (l is poorest, 10 is best), and monitor their work. As each does his or her part of your project, you keep track of the number of lines of debugged code turned in by each programmer. You record this number as a programmer turns in a debugged module. The winner of the contest is the first person to reach l000 lines of debugged code. (You hope this is programmer #9 or #10.) As further proof of the value of these new techniques, you want to determine how many poor programmers it takes to surpass the winner's figure; that is, find the smallest k such that programmers 1 through k (excluding the winner, if he/she is in the first k) have turned in more lines than the winner. Input The input consists of a sequence of triples of integers. The first integer in each pair is the programmer's number (an integer from l to l0), and the second is the number of executable lines of code turned in, and the third has the number of lines of comments turned in. These numbers occur in the same order as that in which the modules were turned in. Data is in http://www. cs. csi. cuny. edu/~yumei/csc326/data/program11.tx t and http://www. cs. csi. cuny. edu/~yumei/csc326/data/program12.tx t Processing Read in integers until someone's total executable code goes over l000. Print out (echo print) each set as you read it. Ignore any input after someone's executable total exceeds 1000. Then print out a table listing the ten programmers and their totals, with the winner flagged as shown in the example that follows. Finally, find the smallest k such that the sum of the totals for programmers l-k exceeds the winner's total. Print k in an explanatory sentence. Partial Sample Output: PROGRAMMER PROGRESS Programmer Lines of Code Lines of Comments 10 230 100 . . 9 400 100 FINAL TOTALS Programmer Lines of Code Lines of Comment 1 51 2 105 3 309 4 101 5 215 6 7 It took programmers 1 through 7 to produce more than the winner. Details Create a header file with the declaration of a structure that holds two integers, one for lines of code and one for lines of comments. Use an array of these structures to keep track of the lines of code that have been handed in so far by each of the programmers. Your main program should only open the input data file, call functions, and close the data file. All of the processing should be done by the functions. Hand in: A listing of the program A listing of the output file Think about: Suppose that instead of a triple of numbers, you had a programmer name, and then two numbers corresponding to executable code and comments. How would you set up the data structures in this case?​

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
Fast sportcars the top speeds of sportscars, given in miles per hour, are: 155 mph bmw m5 217 mph lamborghini aventador spyder 205 mph ferrari 488 205 mph nissan gtr 197 mph chevrolet corvette stingray zr1 258 mph bugatti veyron supersport 195 mph dodge viper 270 mph hennessey venom 155 mph bmw m3 195 mph mercedes sl given: topspeeds=[155; 217; 205; 205; 197; 258; 195; 270; 155; 195]; carnames=string(["bmw m5" "lamborghini aventador spyder" "ferrari 488" "nissan gtr" "chevrolet corvette stingray zr1" "bugatti veyron supersport" "dodge viper" "hennessey venom" "bmw m3" "mercedes sl"]); the variable is a rectangular array. write a function called selectcars to identify cars with the top speed within a given range, and display the identified names. the selected cars speed will be in a range given by lowerbound < speed < upperbound. inputs to the function selectcars are: a column array os all car top speeds named topspeeds, the corresponding chara
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
The option enables you to modify a slide element in most presentation applications.
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
You know the right answer?
C++ You are the manager of a team of ten programmers who have just completed a seminar in structured...
Questions
question
Mathematics, 31.08.2019 07:30
question
English, 31.08.2019 07:30
question
Social Studies, 31.08.2019 07:30
question
Mathematics, 31.08.2019 07:30
Questions on the website: 13722367