Ask a question from expert

Ask now

CSC 150, Computer Science 1.

1 Pages340 Words482 Views
   

Added on  2019-09-16

CSC 150, Computer Science 1.

   Added on 2019-09-16

BookmarkShareRelated Documents
CSC 150, Computer Science 1Programming Assignment 7Arrays85 PointsDog AdoptionsThe total number of dogs adopted out each month from a dog shelter is stored in a data file named dogs.txt. The file contains up to 12 numbers, each written on a separate line. Assume that the first amount is for January, the second for February, etc.Write a program to figure out which month had the most adoptions, which month had the least adoptions, the total and average number of adoptions per month and the median number of adoptions per month. Read the data from the dogs.txt file. Be sure to count the scores as you read them. Return the count to main and use it in the rest of your program to process your partially-filled array.Your program should have separate functions to: Read the dataDisplay the number of the month with the most adoptionsDisplay the number of the month with the least adoptionsFind the total and average (mean)Sort the dataFind the medianDisplay the highest month number, lowest month number, total, average, and sorted dataDesign your program by completing the CSC 150 Program Design Document. Be sure to include a structure chart for the program, the prototype for each function, and a brief description of each function’s purpose. Save the design in a file named DogsDesign_xxx.doc where xxx are your initials and submit it inthe Program 7 Design drop box by the date shown in the calendar – this is before the program due date. Code your program. Save it in a file named dogs_xxx.c where xxx are your initials. Compile, run and test your program. Submit your working .c file in the Program 7 drop box by the date shown in the calendar and drop box tools.
CSC 150, Computer Science 1._1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Payroll Register Creation using Functions & File I/O
|2
|567
|244

Assignment on CISP400 Object Oriented Programming with C++
|6
|2031
|364

5915 Database Design | Assignment
|4
|1104
|410

Guidelines for Writing Assignments - Desklib
|3
|667
|456