Programming Exercises

1:Sometimes, the number of cars passing a certain point on a highway needs to be counted. Suppose a person needs to count the cars passing by every hour for one full week. Write a program that can assist this person in storing, retrieving, and analyzing this information. In particular the program must be able to
  • Store car count entries on an hourly basis for 24 hours a day and for 7 days.

  • Let the user enter a specific count by specifying the day, hour, and count.

  • Let the user retrieve a specific count by specifying the day and hour.

  • Calculate and display the total number of counts for the whole week.

  • Determine the number of hours it takes before a given number of cars have passed by. For example, if the first five hours contain ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.