You are given a file named \"course_roster.csv\" (on Angel) containing an ordere
ID: 3539527 • Letter: Y
Question
You are given a file named "course_roster.csv" (on Angel) containing an ordered list
of all students in the class. Each name is on its own line in the file and is listed in the
following format:
LAST, FIRST
Your program should prompt the user and accept the first name and then the last
name of a student (assume that the user enters both names in all capitals). Using
this input, you must determine the rank of the student according to the list in the
file. If the name is not found, you should report itto the user.
For extra credit(5 points), have your program ask the user if they would like to
search for another student and repeat the process until they answer in the negative.
Hints:
%u2022 Use c-strings to store text. You can use as many as you feel necessary.
%u2022 You will probably want to use c-string functions that were introduced in
class, e.g., strcpy(), strcmp(), strcat(). You can find documentation and
examples of these in the book and online (do not copy them, just reference
them!).
%u2022 You need to format the string of the input name so that it will match the
format of names in the file.
%u2022 Another function that might be useful is getline() since the >> operators read
only up to any whitespace.
%u2022 Use good file input/output practice - make sure the file opens correctly and
be sure to close it.
Testing your program:
Be sure to test your program with various values to ensure it provides the correct
output before submitting to get full credit.
Explanation / Answer
For 60 sec we can expect 60/50 s to process 1 request
=>for 40 s we have 60/50 * 40 s busy time
=> 60 - 60*40/50 idle time
=>60-48 = 12s
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.