Home >  T.A >  cs10 ( Fall 2001 ) >  Lab 10

  CS10 Sec#24 : Topics covererd in Lab #10
T.A: Demetris Zeinalipour
(Fall 2001)

Print this Page   


Attention:
1) The lab this week is for extra credit, thus you are not required to show up to lab.

2) I will have a list of your scores. If you do not show up to lab to receive more graded assignments back and do not check over your scores, then you are forfeiting the chance to discuss these grades with Pr Kelsey.

3) Please check your scores over. All problems with labs and assignment grades up through as5 must be dealt with before Kelsey's last office hours. Any problems with your last assignments that were just returned to you this week must also be dealt with before Kelsey's last office hours unless your lab occurs after her last office hours, then you must send Kelsey and email by Monday of finals week with your problem.

4) It is highly recommended that you work on something (one of your assignments) during your lab even if you are not doing the lab program. There is a computer reserved for you at this time.

Top


Lab 10 - EXTRA CREDIT LAB
New! - Download lab10.exe (win32) here and see how your program should correspond to various inputs.
Download ratings.txt (save it in same directory as the program)
See Solution - C++ solution here (will be available on Saturday since labs are running until friday)


Write a program that will read ratings from a file called ratings.txt (this file should thus be created before running your program).
Use an array to keep track of the number of each rating (1-5 stars). After reading through the file, print out the count of each rating. The file will consist of a number of stars on each line representing a rating (1-5). For example, if your file contained the following, your program should print the following.





Hint: Read the star rating as a string
Notice: Be sure to put all your information (login, lab section, …) at the top of your program. Your lab programs DO NOT get turned in electronically. I will come around and check you off individually.

Top