+1 (229) 255-3712
glass
pen
clip
papers
heaphones

systems programming – lab 1

systems programming – lab 1

  

Lab 1 Directions

Write a C program for a Mililiters to US Fluid Ounces conversion to run on ocelot. (1 Mililiters = 0.0338 US Fluid Ounces using 4 decimal places.)

The source file should have your name & PantherID included in it and it should have an affirmation of originality stating something like: “I affirm that I wrote this program myself without any help from any other people or sources from the internet.”.

It is expected that this program and the programs from this class follow programming standards learned in previous classes. There should be a program description at the top as well as descriptions of all functions used in the code.

Code should be nicely indented using a consistent style and commented appropriately.

You can choose to indent your code 2, 3 , o r 4 spaces for each level of nesting as long as you are consistent through out the code. If you modify a file, then you should make all indentation in that file match your style.

You can choose either style for your curly braces , but be consistent :

i f ( ... ) {

}

O r

i f ( ... )

{

}

Create a nicely formatted chart with the conversions of each of the following values from Mililiters to US Fluid Ounces. There is no user input, these values can be constants in the program.

  • 10
  • 18
  • 30
  • 58

Columns should be aligned with numbers right justified and rounded to 4 digits after the decimal point. You do not need to include any grid lines, those are from Excel. You should include a title line that says Convert Mililiters at the top. This is a sample of a different conversion to show you how to align columns. Note that this one has 5 digits after the decimal point. Use formatting in the printf statement to align columns properly. Do not use spaces to push data around.

Picture of the output properly aligned.

Create a simple Makefile to compile your program into an executable called convert.

You should submit a compressed zip file named FirstNameLastNameL1.zip with the following files.

  1. The source code, convert.c
  2. The Makefile file which should be called Makefile with no extension. I should be able to type make at the command line to compile your program.
  3. A screenshot of the output of the program running on ocelot (be sure the command line prompt shows.) The screenshot should just be a file named with your FirstNameLastName.png or .jpg.

Do not include any other files or folders in the zipfile.

Programs that do not compile and do something useful when run will not earn any credit at all.

Rubric

Lab 1 Rubric CMR Spring 2022

Lab 1 Rubric CMR Spring 2022

Criteria Ratings Pts

This criterion is linked to a Learning OutcomeZip File named FirstNameLastNameL1.zip using the student nameNo Spaces, underscores, or other characters.
Capitalization like
CarylRahnL1.zip

4 pts

Meets Requirements

Submission file named exactly as specified

2 pts

Minor Errors

Submission file has extra spaces, underscores or characters in the name

0 pts

Needs Improvement

Submission file not as specified

4 pts

This criterion is linked to a Learning OutcomeMakefile named as specifiedCapital M used, no extension added.
File is called Makefile

4 pts

Meets Requirements

Makefile named correctly with proper capitalization

2 pts

Minor Errors

Makefile spelled with a lower case m as in makefile

0 pts

Needs Improvement

No Makefile included

4 pts

This criterion is linked to a Learning OutcomeTyping make at the command line should create executable named convert

10 pts

Meets Requirements

Typing make at the command line creates an executable file name as requested.

8.33 pts

Minor Errors

Typing make at the command line creates an executable named something similar to what was requested.

0 pts

Needs Improvement

Typing make at the command line creates an executable named a.out or anything not relevant.

10 pts

This criterion is linked to a Learning OutcomeThere should be no warnings during compile

4 pts

Meets Requirements

There were no warnings during compile.

2 pts

Minor Errors

There was one warning during the compile.

0 pts

Needs Improvement

There were multiple warnings during the compile.

4 pts

This criterion is linked to a Learning OutcomeComment at the top needs student name, Panther ID, a Program Description and an Affirmation of Originality.

8 pts

Meets Requirements

All required header items were included.

4 pts

Minor Errors

One or two items were missing from the header.

0 pts

Needs Improvement

More than 2 items were missing or the header was not included

8 pts

This criterion is linked to a Learning OutcomeProgram should have consistent indentationIndentation should have curly braces lined up in either of the two standard formats. They can be lined up right above each other or the opening curly brace can be on the right end of the line above where the block begins.

4 pts

Meets Requirements

Consistent indentation with curly braces lined up in either of the two standard formats.

2 pts

Minor Errors

Indentation not consistent in one or two places

0 pts

Needs Improvement

Indentation not consistent in three or more place

4 pts

This criterion is linked to a Learning OutcomeProgram should have comments as neededComments should be included for all functions, loops and other sections of code.

4 pts

Meets Requirements

Good comments are included throughout the program in the body of the functions and at the top of each function

2 pts

Minor Errors

Some comments are included, but more are needed

0 pts

Needs Improvement

No comments are included

4 pts

This criterion is linked to a Learning OutcomeThe program works as expected with correct output.

10 pts

Meets Requirements

The output had correct values.

5 pts

Minor Errors

There were minor errors in the output.

0 pts

Needs Improvement

The output is not correct.

10 pts

This criterion is linked to a Learning OutcomeThe program had good formatting of the output.

10 pts

Meets Requirements

The formatting of the output looked good with nice alignment.

5 pts

Minor Errors

Formatting of the output had minor errors.

0 pts

Needs Improvement

Formatting of the output had major errors.

10 pts

This criterion is linked to a Learning OutcomeNo other files other than the source file, screenshot, and Makefile are included. When unzipped only the two files should be viewable, not another folder.

2 pts

Meets Requirements

Only the three requested files were included.

1 pts

Minor Errors

There is an extra file or folder included

0 pts

Needs Improvement

There are multiple other files or folders included

2 pts

Total Points: 60