User Tools

Site Tools


Sidebar

projects

wcp1 (due 20220824)
fwf0 (due 20220831)
ntr0 (due 20220831)
pct1 (bonus; due 20220831)
wcp2 (due 20220831)
dtr0 (due 20220907)
pct2 (due 20220907)
pct3 (bonus; due 20220907)
wcp3 (due 20220907)
sof0 (due 20220914)
wcp4 (due 20220914)
pct4 (due 20220915)
dow0 (due 20220921)
wcp5 (due 20220921)
pct5 (bonus; due 20220922)
cnv0 (due 20220928)
gfo0 (due 20220928)
wcp6 (due 20220928)
pct6 (due 20220929)
cnv1 (due 20221005)
pct7 (bonus; due 20221005)
wcp7 (due 20221005)
bwp1 (bonus; due 20221019)
cbf0 (due 20221019)
pct8 (due 20221019)
wcp8 (due 20221019)
pct9 (bonus; due 20221026)
wcp9 (due 20221026)
gfo1 (due 20221102)
pctA (due 20221102)
sam0 (due 20221102)
wcpA (due 20221102)
pctB (bonus; due 20221109)
wcpB (due 20221109)
oop0 (due 20221110)
oop1 (due 20221116)
pctC (due 20221116)
wcpC (due 20221116)
bwp2 (bonus; due 20221201)
oop2 (due 20221201)
pctD (bonus; due 20221201)
wcpD (bonus; due 20221201)
pctE (bonus; due 20221207)
wcpE (bonus; due 20221207)
gfo2 (due 20221208)
EoCE (due 20221219)
haas:fall2022:cprog:projects:dtr0

Corning Community College

CSCS1320 C/C++ Programming

PROJECT: Data Type Resources (DTR0)

OBJECTIVE

To begin our exploration of programming, starting with an investigation into the various data types available in C, along with their properties, and collaboratively authoring and documenting the project and its specifications.

GRABIT

To assist with consistency across all implementations, data files for use with this project are available on lab46 via the grabit tool. Be sure to obtain it and ensure your implementation properly works with the provided data.

lab46:~/src/SEMESTER/DESIG$ grabit DESIG PROJECT

EDIT

You will want to go here to edit and fill in the various sections of the document:

BACKGROUND

BINARY NUMBERS

Also known as the “Base 2” number system, binary is the lowest level of machine language and the language that computers use to receive, perform, and send instructions.

Digits and Counting

Since binary is “Base 2”, it only uses two digits to represent its numbers: 0 and 1.

Counting in binary works the same way as it does in decimal (Base 10), or any other number system: each spot, or “place” in a binary number starts at 0, then counts up to 1. Since this is Base 2, each place can not go higher than 1, so if we were to count up again, this digit would carry over to the next place, and start again at 0.

For example: 1001 + 1 = 1010

This is just like decimal, where a number starts at 0, then counts up to 9, if we try to count up after that, the number carries over to the Tens place, and restarts at 0:

109 + 1 = 110

NOTE: Just because a binary number uses similar digits to decimal and looks similar to decimal, it does not mean that a binary number can just be read as a decimal number.

To put it another way:

10102 != 101010

Since decimal is “Base 10”, each place in a number is a power of ten, 100, 101, and so on. We know these as the “Ones” place, the “Tens” place, the “Hundreds” place, etc.

The same is true for binary, but since it is Base 2, each place is a power of 2: 20, 21, 22, and so on.

Use in Computing

Binary is important because it is the number system and language that computers use to communicate. Any set of instructions sent to a computer will consist of only 1's and 0's.

Although binary is what computers use to communicate, it is much more difficult for humans to use binary to try and perform calculations or write code.

As stated above, each place in a binary number can only be a 1 or 0, which means each place is a power of 2. So a decimal number like 257 would be 100000001 in binary, as we can see, numbers can get very big, very fast.

With a number system where even simple numbers and code can become a massive amount of 1's and 0's, it is very difficult to perform calculations on these numbers without making a mistake. So, programmers have used higher base numbering systems to shorten these numbers down immensely. These numbering systems are also powers of 2, in order to cleanly split binary numbers into smaller segments, such as octal (Base 8), or hexadecimal (Base 16).

HEXADECIMAL NUMBERS

DATA TYPES IN C

Basic Types

They are arithmetic types and are further classified into: (a) integer types and (b) floating-point types.


Enumerated Types

They are again arithmetic types and they are used to define variables that can only assign certain discrete integer values throughout the program.


The "void" Type

The type specifier “void” indicates that no value is available.


Derived Types

They include (a) Pointer types, (b) Array types, © Structure types, (d) Union types and (e) Function types.

PRINTF FORMAT SPECIFIERS

PROGRAM SPECIFICATIONS

 

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

  • Project must be submit on time, by the deadline.
    • Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
  • All code must compile cleanly (no warnings or errors)
    • Compile with the -Wall and –std=gnu18 compiler flags
    • all requested functionality must conform to stated requirements (either on this document or in a comment banner in source code files themselves).
  • Executed programs must display in a manner similar to provided output
    • output formatted, where applicable, must match that of project requirements
  • Processing must be correct based on input given and output requested
  • Output, if applicable, must be correct based on values input
  • Code must be nicely and consistently indented
  • Code must be consistently written, to strive for readability from having a consistent style throughout
  • Code must be commented
    • Any “to be implemented” comments MUST be removed
      • these “to be implemented” comments, if still present at evaluation time, will result in points being deducted.
      • Sufficient comments explaining the point of provided logic MUST be present
  • No global variables (without instructor approval), no goto statements, no calling of main()!
  • Track/version the source code in your lab46 semester repository
  • Submit a copy of your source code to me using the submit tool (make submit on lab46 will do this) by the deadline.

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following (assuming you have a program called uom0.c):

lab46:~/src/SEMESTER/DESIG/PROJECT$ make submit

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.

RUBRIC

I'll be evaluating the project based on the following criteria:

39:dtr0:final tally of results (39/39)
*:dtr0:used grabit to obtain project by the Sunday prior to duedate [6/6]
*:dtr0:clean compile, no compiler messages [7/7]
*:dtr0:program conforms to project specifications [20/20]
*:dtr0:code tracked in lab46 semester repo [6/6]

Pertaining to the collaborative authoring of project documentation

  • each class member is to participate in the contribution of relevant information and formatting of the documentation
    • minimal member contributions consist of:
      • near the class average edits (a value of at least four productive edits)
      • near the average class content change average (a value of at least 256 bytes (absolute value of data content change))
      • near the class content contribution average (a value of at least 1kiB)
      • no adding in one commit then later removing in its entirety for the sake of satisfying edit requirements
    • adding and formatting data in an organized fashion, aiming to create an informative and readable document that anyone in the class can reference
    • content contributions will be factored into a documentation coefficient, a value multiplied against your actual project submission to influence the end result:
      • no contributions, co-efficient is 0.50
      • less than minimum contributions is 0.75
      • met minimum contribution threshold is 1.00

Additionally

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
  • Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction
haas/fall2022/cprog/projects/dtr0.txt · Last modified: 2022/08/28 21:37 by 127.0.0.1