This document provides instructions and examples for a programming assignment to automate combining multiple CSV gradebooks into a single master gradebook. Students are asked to write a C++ application that takes a list of CSV files as input, with each file containing the grades for a section. The program should output two CSV files - a summary file with overall grades for each student, and a details file with a breakdown of each student's grades across all sections. Examples of the input and expected output file formats are provided.
pa5PA5.docxCS 211 PA #5At certain universities, professors of.docx
1. pa5/PA5.docxCS 211 PA #5
At certain universities, professors often teach large classes in
which an individual TA is responsible for grading a given
section's programming assignment. Assuming that each TA fills
in the Excel form correctly (a rather large assumption), the
instructor must combine each section's grades into a master
gradebook file that can be published to students. Less technical
professors combine the gradebook by hand. However, this
process can be cumbersome and is most certainly error prone!
Your task for this assignment is to automate this process by
writing a C++ application that automatically combines several
CSV-based gradebooks into a single master gradebook.
CSV File Format
Each CSV contains a single section's grades for a given
category (e.g. homework). All files have a similar format. The
top row contains headers and the 2nd row contains the
maximum grade for each assignment. Similarly, the first
column is always the student's ID number, the 2nd the student's
name, and the 3rd is their overall score for the grading category.
Rows after the third row contain marks for a given task. Here's
an example:
Obtaining a list of CSV files
Your program should prompt the user for a list of CSV files to
parse. Each file will be in the format
"<category>_<number>.csv". For example: "homework_1.csv",
"homework_2.csv", and "exams_2.csv" are examples of
potential file names. Note that <category> can be any string.
Listed previously are strings that make sense, but your
homework should be able to handle something like
"sdfsrwe_1.csv" just fine! Also, be sure to use <category> as
the separator for the summary CSV file (discussed later).
2. Expected Output
Your program should generate two CSV files: one summary file
with overall grades and one details file that contains the grading
breakdown for all sections. Summary CSV File
The summary CSV file should contain all students, an overall
class grade (in percent), and a points breakdown for each
grading category. Here's an example screenshot of a summary
file whose individual CSV files had a "Homework" and
"Quizzes" <category> as inputs:
Details File
The details file should essentially aggregate all of a student's
records into a single file. In other words, it should include a
detailed breakdown of every student's marks in the individual
CSV files. Here's an example:
Header Comment, and Formatting
1. Be sure to modify the file header comment at the top of your
script to indicate your name, student ID, completion time, and
the names of any individuals that you collaborated with on the
assignment.
2. Remember to follow the basic coding style guide. A basic
list of rules is included with this document.
Deliverables
Your final project and reflection must be as a ZIP file through
Canvas no later than midnight on Monday, December 5, 2016.
A partial check-in of your progress will occur during lab on
November 14. Remember that your submission must either
contain a CodeBlocks or Visual Studio project file!Reflection
Essay
In addition to the programming tasks listed above, your
submission must include an essay that reflects on your
experiences with this homework. This essay must be at least
350 words long. Note that the focus of this paper should be on
your reflection, not on structure (e.g. introductory paragraph,
3. conclusion, etc.). The essay is graded on content (i.e. it shows
deep though) rather than syntax (e.g. spelling) and structure.
Below are some prompts that can be used to get you thinking.
Feel free to use these or to make up your own.
· Describe a particular struggle that you overcame when
working on this programming assignment.
· Conversely, describe an issue with your assignment that you
were unable to resolve.
· Provide advice to a future student on how he or she might
succeed on this assignment.
1. Describe the most fun aspect of the assignment.
1. Describe the most challenging aspect of the assignment.
1. Describe the most difficult aspect of the assignment to
understand.
1. Provide any suggestions for improving the assignment in the
future.
Grading Criteria
Your assignment will be judged by the following criteria:
· [25] November 14 Partial checkin. In order to receive full
credit, you must demonstrate a program that:
· Obtains a list of files from the user
· Reads the list of files into one or more data structures (at
minimum a vector, ideally a hashtable)
· Contains one or more UML diagrams of the classes that you
use or intend to use in your project.
· [5] Your final project runs and compiles
· [50] Your final project passes my test cases
· [10] Your reflection essay satisfies the requirements as
specified earlier in this document.
· [15] Your project contains good structure. In other words,
your program intelligently uses classes when appropriate and
generally conforms to good OOP design (i.e. everything isn't
slapped into main).
14. J6 4 2
J7 4 6
J8 2 5
J9 4 3
J10 6 5
J11 7 3
pa4/output.txt
*** Tick: 1 ***
Processing jobs file...
The next job in the list is: J1.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 1.
Adding highest priority job:
J1 8 10
Jobs queue is empty.
15. Running active jobs...
*** Tick: 2 ***
Processing jobs file...
The next job in the list is: J2.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 1.
Adding highest priority job:
J2 2 1
Jobs queue is empty.
Running active jobs...
Job "J2" is complete. Freeing up resources.
16. *** Tick: 3 ***
Processing jobs file...
The next job in the list is: J3.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 4). Waiting for
resources...
Running active jobs...
*** Tick: 4 ***
Processing jobs file...
The next job in the list is: J4.
Adding job to jobs queue...
17. Processing jobs queue...
Current number of scheduled jobs: 2.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
Running active jobs...
*** Tick: 5 ***
Processing jobs file...
The next job in the list is: J5.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 3.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
18. Running active jobs...
*** Tick: 6 ***
Processing jobs file...
The next job in the list is: J6.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 4.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
Running active jobs...
*** Tick: 7 ***
Processing jobs file...
The next job in the list is: J7.
19. Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 5.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
Running active jobs...
*** Tick: 8 ***
Processing jobs file...
The next job in the list is: J8.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 6.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
20. Running active jobs...
*** Tick: 9 ***
Processing jobs file...
The next job in the list is: J9.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 7.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
Running active jobs...
*** Tick: 10 ***
21. Processing jobs file...
The next job in the list is: J10.
Adding job to jobs queue...
Processing jobs queue...
Current number of scheduled jobs: 8.
Not enough free CPUs (requested: 10, actual: 4). Waiting for
resources...
Running active jobs...
Job "J1" is complete. Freeing up resources.
*** Tick: 11 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 8.
22. Adding highest priority job:
J4 10 2
Not enough free CPUs (requested: 4, actual: 2). Waiting for
resources...
Running active jobs...
*** Tick: 12 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 7.
Not enough free CPUs (requested: 4, actual: 2). Waiting for
resources...
Running active jobs...
Job "J4" is complete. Freeing up resources.
23. *** Tick: 13 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 7.
Adding highest priority job:
J6 4 2
Adding highest priority job:
J10 6 2
Not enough free CPUs (requested: 4, actual: 2). Waiting for
resources...
Running active jobs...
24. *** Tick: 14 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 5.
Not enough free CPUs (requested: 4, actual: 2). Waiting for
resources...
Running active jobs...
Job "J6" is complete. Freeing up resources.
Job "J10" is complete. Freeing up resources.
*** Tick: 15 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
25. Current number of scheduled jobs: 5.
Adding highest priority job:
J9 4 3
Adding highest priority job:
J8 2 5
Adding highest priority job:
J7 4 6
Not enough free CPUs (requested: 5, actual: 2). Waiting for
resources...
Running active jobs...
*** Tick: 16 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
26. Current number of scheduled jobs: 2.
Not enough free CPUs (requested: 5, actual: 2). Waiting for
resources...
Running active jobs...
*** Tick: 17 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 2.
Not enough free CPUs (requested: 5, actual: 2). Waiting for
resources...
Running active jobs...
Job "J9" is complete. Freeing up resources.
27. *** Tick: 18 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 2.
Adding highest priority job:
J5 5 8
Not enough free CPUs (requested: 12, actual: 1). Waiting for
resources...
Running active jobs...
*** Tick: 19 ***
Processing jobs file...
There are no more jobs in the jobs file.
28. Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 1). Waiting for
resources...
Running active jobs...
Job "J8" is complete. Freeing up resources.
*** Tick: 20 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 3). Waiting for
resources...
Running active jobs...
29. Job "J7" is complete. Freeing up resources.
*** Tick: 21 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 7). Waiting for
resources...
Running active jobs...
*** Tick: 22 ***
Processing jobs file...
There are no more jobs in the jobs file.
30. Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 7). Waiting for
resources...
Running active jobs...
*** Tick: 23 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 7). Waiting for
resources...
Running active jobs...
31. *** Tick: 24 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 7). Waiting for
resources...
Running active jobs...
*** Tick: 25 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
32. Current number of scheduled jobs: 1.
Not enough free CPUs (requested: 12, actual: 7). Waiting for
resources...
Running active jobs...
Job "J5" is complete. Freeing up resources.
*** Tick: 26 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 1.
Adding highest priority job:
J3 12 12
Jobs queue is empty.
33. Running active jobs...
*** Tick: 27 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 28 ***
Processing jobs file...
There are no more jobs in the jobs file.
34. Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 29 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
35. *** Tick: 30 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 31 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
36. Running active jobs...
*** Tick: 32 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 33 ***
Processing jobs file...
There are no more jobs in the jobs file.
37. Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 34 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
38. *** Tick: 35 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
*** Tick: 36 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
39. Jobs queue is empty.
Running active jobs...
*** Tick: 37 ***
Processing jobs file...
There are no more jobs in the jobs file.
Processing jobs queue...
Current number of scheduled jobs: 0.
Jobs queue is empty.
Running active jobs...
Job "J3" is complete. Freeing up resources.
pa4/PA4.docxCS 211 Programming Assignment #4
Your organization has purchased a new parallel computer (or
"cluster") which has several processors. Your task is to design
and implement a simple shortest-job-first scheduler that allows
40. multiple users to access the cluster at the same time, as per the
following specification:
The scheduler performs all required functions at regular
intervals, often called "ticks." During each tick, the scheduler
must take into consideration several pieces of information:
1. Are there jobs in our input file that contains a list of jobs to
be run? If so, add that job to our list of current jobs. Note that
our jobs file contains one job per line in the following format:
"<JOB_NAME> <CPUS_REQUIRED> <DURATION>". Only
one job may be added to the jobs queue during any given tick.
If a job has a name of "NULL," skip that job for the current tick
(i.e. no jobs will be added during this tick). If a job requires
more CPUs than the cluster contains, you should output an error
and terminate execution of the program.
2. Are there jobs in the jobs queue? If so, find the job with the
shortest duration. Are there enough CPU resources for this job
to run? If so, begin execution (i.e. add to the active jobs
queue). If, after adding the previous job, are there enough
resources to run the next job in the queuejob? If so, go back to
the beginning of step #2. Stop adding to the list of active jobs
when there are not enough CPU resources available for the job
to execute. Try again in the future.
3. For each executing job (note that there may be multiple
concurrent jobs), perform one tick's worth of work. After,
check to see if the job is done executing. If complete, remove
from the active jobs queue and allocate the job's CPU resources
back into the resource pool. Note that it is possible for a job
with a duration of 1 to be scheduled, executed, and completed
during the same tick.
Upon completion, your program should produce a CSV file
called "result.csv" that documents the point at which each job
enters the jobs queue, finishes its execution, and the difference
between these two values.
Sample Jobs File
41. Below is a sample jobs file that you can use for testing:
12
J1 8 10
J2 2 1
J3 12 12
J4 10 2
J5 5 8
J6 4 2
J7 4 6
J8 2 5
J9 4 3
J10 6 2
Sample Output
Included with this document is the file "output.txt" that contains
the output of my program running the sample jobs list with a
CPU count of 12 (as specified in the first line of the input file).
Also included is the generated CSV file.
Header Comment, and Formatting
1. Be sure to modify the file header comment at the top of your
script to indicate your name, student ID, completion time, and
the names of any individuals that you collaborated with on the
assignment.
2. Remember to follow the basic coding style guide. A basic
list of rules is included with this document.
Deliverables
You must upload your program and reflection as a ZIP file
through Canvas no later than midnight on Monday, October 24,
2016. Remember that your submission must either contain a
CodeBlocks or Visual Studio project file!Reflection Essay
In addition to the programming tasks listed above, your
submission must include an essay that reflects on your
experiences with this homework. This essay must be at least
42. 350 words long. Note that the focus of this paper should be on
your reflection, not on structure (e.g. introductory paragraph,
conclusion, etc.). The essay is graded on content (i.e. it shows
deep though) rather than syntax (e.g. spelling) and structure.
Below are some prompts that can be used to get you thinking.
Feel free to use these or to make up your own.
· Describe a particular struggle that you overcame when
working on this programming assignment.
· Conversely, describe an issue with your assignment that you
were unable to resolve.
· Provide advice to a future student on how he or she might
succeed on this assignment.
1. Describe the most fun aspect of the assignment.
1. Describe the most challenging aspect of the assignment.
1. Describe the most difficult aspect of the assignment to
understand.
1. Provide any suggestions for improving the assignment in the
future.
Grading
Your grade will be determined as follows:
· [10] Your program uses a priority queue to model the
scheduler.
· Your program uses good Object Oriented Programming
principles. As evidence of this, your program uses classes to
represent:
· [5] A given job
· [5] A CPU within the cluster
· [5] The cluster of CPUs itself
· [10] Your reflection essay satisfies the requirements as
specified earlier in this document.
· [5] Your code is well documented and generally easy to read.
· [60] Does the code compile and run successfully on my test
cases? Does the generated CSV file appear to be correct?