User Tools

Site Tools


Sidebar

projects

  • cci0 (due 20160127)
  • mms0 (due 20160203)
  • dow0 (due 20160210)
  • mbe0 (due 20160224)
  • pnc0 (due 20160302)
  • mbe1 (due 20160309)
  • cos0 (due 20160316)
  • sam0 (due 20160323)
  • cbf0 (due 20160406)
  • afn0 (due 20160413)
  • gfo0 (due 20160420)
haas:spring2016:cprog:projects:gfo0

This is an old revision of the document!


Corning Community College

CSCS1320 C/C++ Programming

~~TOC~~

Project: PROCESS IMPLEMENTATION - GRADE FIGURE-OUTERER (gfo0)

Objective

To implement a programmatic solution (ie simulation) of a real life process- the obtaining, processing, and display of your status in the course.

Prerequisites/Corequisites

In addition to the new skills required on previous projects, to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:

  • you can calculate percentages
  • ability to open and access data from files
  • using loops to automate a process
  • using functions to organize your code

Background

Throughout the semester, you've been accumulating points for your class participation, journal, and projects.

This information has been accessible via the status tool.

Task

The task at hand can benefit from loop and array assistance.

For instance, taking the number input and processing it so each digit occupies its own array element would facilate your efforts in the overall task– a process strongly resembling some of the work you had to do in the mbe1 project to get your input ready for the multiply by 11 activity.

Functions

As indicated, this task shares many attributes with the mbe1 project; in fact, the mental math process itself may be slightly simpler. That affords us the opportunity to introduce and learn about further programming optimizations, without the concurrent burden of new concepts.

Specifically, we will look at modularizing aspects of our solution, using functions, to make for a cleaner, more organized codebase.

We've been using functions all along (everytime you use fprintf() or fscanf(), for instance), but the value is not just in using pre-existing ones, but also in making our own to use.

Submission

To successfully complete this project, the following criteria must be met:

  • Code must compile cleanly (no warnings or errors)
    • Use the -Wall flag when compiling.
  • Output must be correct, and resemble the form given in the sample output above.
  • Code must be nicely and consistently indented (you may use the indent tool)
  • Code must utilize the algorithm presented above
  • Code must be commented
    • have a properly filled-out comment banner at the top
    • have at least 20% of your program consist of //-style descriptive comments
  • Track/version the source code in a repository
  • Submit a copy of your source code to me using the submit tool.

To submit this program to me using the submit tool, run the following command at your lab46 prompt:

$ submit cprog gfo0 gfo0.c
Submitting cprog project "gfo0":
    -> gfo0.c(OK)

SUCCESSFULLY SUBMITTED

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

0x4: Data Processing

Throughout the semester, your class-related activities have been numerically captured and made available to you via the status tool.

Now that we are at the end, and your programming skillset is significantly expanded, I would like you to write a program to take this data and calculate your grade (reflective of currently recorded data).

I've designed a tool that will take all your status data and 'flatten' it… converting all the necessary data into one stream of values. To obtain this data, simply run the flattenstatus command and the file status.flat will be created in your current working directory.

For example:

lab46:~/src/cprog/eoce/0x4$ flattenstatus
lab46:~/src/cprog/eoce/0x4$ cat status.flat
-1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 -2 1 1 1 0 1 0 1 0 1 0 0 1 -3 11 13 6 9 4 9 5 9 6 9 19 20 6 0 18 20 -4
lab46:~/src/cprog/eoce/0x4$ 

Your program needs to do the following:

  • check for and open the status.flat file
    • if error occurs, display message and exit
  • reading one integer at a time, load the values into an array according to their category
  • there will be three categories (arrays), each one identified by a header/sentinel value:
    • -1 indicates the start of participation data (28% of grade)
    • -2 indicates end of participation data / start of journal data (36% of grade)
    • -3 indicates end of journal data / start of project data (36% of grade)
    • -4 indicates end of project data (and end of data stream)
  • once loaded into their arrays, calculate the grade component
  • tally up all three, and print out the results

Final program output should resemble the following:

lab46:~/src/cprog/eoce/0x4$ ./0x4
Participation Component: 20 / 28
Journal Component:       20 / 36
Projects Component:      30 / 36
Total:                   70 /100
lab46:~/src/cprog/eoce/0x4$ 
haas/spring2016/cprog/projects/gfo0.1460479923.txt.gz · Last modified: 2016/04/12 16:52 by wedge