User Tools

Site Tools


Sidebar

projects

ntr0 (due 20210825)
pct1 (bonus; due 20210819)
wcp1 (due 20210818)
fwf0 (due 20210825)
pct2 (due 20210825)
wcp2 (due 20210825)
sof0 (due 20210901)
pct3 (bonus; due 20210901)
wcp3 (due 20210901)
dow0 (due 20210908)
pct4 (due 20210908)
wcp4 (due 20210908)
cbf0 (due 20210915)
gfo0 (due 20210915)
pct5 (bonus; due 20210915)
wcp5 (due 20210915)
sam0 (due 20210922)
pct6 (due 20210922)
wcp6 (due 20210922)
cnv0 (due 20210929)
pct7 (bonus; due 20210929)
wcp7 (due 20210929)
cnv1 (due 20211006)
pct8 (due 20211006)
wcp8 (due 20211006)
cos0 (due 20211020)
pct9 (bonus; due 20211020)
bwp1 (bonus; due 20211020)
wcp9 (due 20211020)
oop0 (due 20211027)
gfo1 (due 20211027)
pctA (due 20211027)
wcpA (due 20211027)
oop1 (due 20211103)
pctB (bonus; due 20211103)
wcpB (due 20211103)
oop2 (due 20211110)
pctC (due 20211110)
wcpC (due 20211110)
gfo2 (due 20211117)
pctD (bonus; due 20211117)
pctE (bonus; due 20211201)
bwp2 (bonus; due 20211201)
EoCE (due 20211209)
haas:fall2021:cprog:projects:cci0

Corning Community College

CSCS1320 C/C++ Programming

Project: CCI0

Errata

This section will document any updates applied to the project since original release:

  • revision #: <description> (DATESTAMP)

Objective

In this project, we get started with some course initialization activities.

Project Overview

Course Homepage

You're reading this, so you've likely already found your way to the course homepage. It consists of the syllabus plus additional course resources.

Please familiarize yourself with it, bookmarking important resources as appropriate, so that you can refer back when needed.

I'd recommend knowing how to get to the projects page (where you found the link for this project), as new content will be posted there.

Syllabus

Be sure to read through and over the syllabus, ensuring there are no questions on the material and organization of the course.

Wiki

The course homepage/syllabus, your journal, and other resources are made available to you via the lab46 wiki. In order to better access your web resources for the course, you must log in:

  • top right of this page, notice the “login” button
    • sign in with your lab46 username and password
  • once logged in, note the left sidebar has been updated with some custom (to you) content
    • links to the course homepages of the classes you are taking with me
    • a link to your journal

Go ahead and familiarize yourself with these resources.

Journal Intro

Clicking on your journal link:

Familiarize yourself with your Journal, and once there:

  • customize it (title/subtitle)
  • add an introduction
  • create your first week content

NOTE: Week 1 journal entry will be due before the week1 journal deadline, the remainder of the intro Journal content will be due by this project's deadline.

Mailing List

I intend to establish a mailing list which I will use for class announcements (along with irc, the notes wiki page, your journal, etc.).

During project submission, please provide one or more e-mail addresses you check somewhat regularly so that I can subscribe you to the list.

To do this, place your preferred e-mail address(es) in an info.text file, prefixed via an “e-mail: ” descriptor.

For example:

name: John Smith
e-mail: jsmith1234@site.com

Class Chat (IRC)

Run the “chat” script at a lab46 prompt to get established in the class chat.

You will likely be joining multiple channels. Pay attention to the blue status bar at the bottom.

To switch between channels:

  • press 'alt+NUMBER'
  • you can also use 'ctrl+p' for the prior one, and 'ctrl-n' for the next one

To detach from the class chat, type: ctrl+a d

(press and hold control when you tap 'a'; release both keys and press 'd').

Lab46 Shell

For many of you, this will be your first experience in the LAIR and/or logging onto Lab46.

If you are new, the first day I will have your login information which will be provided, and we will spend a few moments getting everyone logged in.

If you are already familiar, please ensure you can still log into the pods and lab46.

Personal/Per-User Lab46 Mercurial Repository

NOTE: If you have already done this in a prior semester, you do NOT need to do it again.

To both aid you and help you develop better development skills, I'd like for you to make regular commits and pushes to your Lab46 mercurial repository.

This way, you can have a regular snapshot of your work as you go along, plus have the ability to grab an older copy should something go wrong.

Like the Journal, I will be looking for a minimal amount of repository-related activity PER WEEK.

To set up your repository, run the “fixrepo” script:

lab46:~$ fixrepo

For basic repository operation, when you make new files you'd like to track, or see the status of any tracked files that have changed:

lab46:~$ cd src
lab46:~/src$ hg status
A .hgignore
lab46:~/src$ 

Once cloned (to your ~/src directory), you will be able to add, commit, and push changes made:

lab46:~/src$ hg add
lab46:~/src$ hg commit -m "brief message describing the changes"
lab46:~/src$ hg push

On the push, you will be prompted to provide your lab46 password.

And that's it! Repeat this process (NOT the 'fixrepo'; only do that once) for any changes you make to your repository.

Program to Implement

As a first week exercise, I would like you to implement, successfully compile, and verify correct execution of the best first program every great programmer writes: Hello World

Code will be as follows:

1
/*
 * hello.c - the first best C program ever
 *
 * written by: your name
 */
#include <stdio.h>
 
int main()                              // every program needs a start, main() is ours
{
    fprintf(stdout, "Hello, World!\n"); // display a message to STDOUT
    return (0);                         // return a success status to OS
}

Your task will be to transcribe this code (sans line numbers), into a source file (call it hello.c for simplicity), within some subdirectory of your lab46 account (~/src/cprog/cci0/ may be a good choice).

lab46:~$ mkdir src/cprog/cci0
lab46:~$ cd src/cprog/cci0
lab46:~/src/cprog/cci0$ 

You may want to use the nano text editor for this:

lab46:~/src/cprog/cci0$ nano hello.c

The nano text editor is a simple editor that provides basic functionality (commands listed at the bottom of the screen. You press the CONTROL key in combination with whatever letter invokes the desired functionality).

To save the file: CTRL+o

To save and exit (or exit if there are no changes made): CTRL+x

Note that if there are any changes, you will be prompted whether or not you'd like to save them (the changes are in memory (aka the buffer), and nano will prompt if you'd like to save the modified buffer). You will then be prompted for the filename (filling in the current filename, if there is one). Just press enter to accept these changes.

Verify you typed in everything correctly by compiling it; you want no warnings or errors:

lab46:~/src/cprog/cci0$ gcc -o hello hello.c
lab46:~/src/cprog/cci0$ 

Get to know/ask questions about that gcc line… this will not be the only time you see it.

Finally, verify the program runs as anticipated:

lab46:~/src/cprog/cci0$ ./hello
Hello, World!
lab46:~/src/cprog/cci0$ 

Once satisfied, be sure to submit the program as indicated below.

Submission Criteria

To be successful in this project, the following criteria must be met:

  • Project must be submit on time, by the posted deadline to be eligible for full credit.
    • Late submissions will lose 25% credit per day, with the submission window closing on the 4th day following the deadline.
    • Early submissions can earn 1 bonus point per day in advance of the posted due date.
  • All code must compile cleanly (no warnings or errors)
    • all requested functions must be implemented in the related library or program
    • all requested functionality must conform to stated requirements (either on this project page or in 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 (you may use the indent tool)
  • 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
  • Track/version the source code in a repository
  • Submit a copy of your source code to me using the submit tool by the deadline.
  • Make sure your submitted source code is in a file called hello.c
  • Make sure it outputs exactly like the sample output above.
  • Create and submit a text file called info.text that contains the following information:
    • preferred name/nickname
    • preferred e-mail address
    • irc nick used in class chat (your username if unchanged)
    • other information I should know

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following:

lab46:~/src/cprog/cci0$ submit cprog cci0 hello.c info.text
Submitting cprog project "cci0":
    -> hello.c(OK) 
    -> info.text(OK)

SUCCESSFULLY SUBMITTED
lab46:~/src/cprog/cci0$ 

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.

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

13:cci0:final tally of results (13/13)
*:cci0:customized journal (title and intro) [1/1]
*:cci0:joined class irc chat [1/1]
*:cci0:submitted proper info.text file [1/1]
*:cci0:cloned lab46 mercurial repository into ~/src [1/1]
*:cci0:submitted file called hello.c [1/1]
*:cci0:committed and pushed hello.c to repository [1/1]
*:cci0:adequate and consistent indentation in hello.c [1/1]
*:cci0:sufficient comments in hello.c [1/1]
*:cci0:executable runs without issue [1/1]
*:cci0:output conforms to project specifications [1/1]
*:cci0:adequate modifications in hello.c [1/1]
*:cci0:no compiler warnings for hello.c [1/1]
*:cci0:no compiler errors for hello.c [1/1]

Additionally:

  • Solutions not abiding by spirit of project will be subject to a 25% 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 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/fall2021/cprog/projects/cci0.txt · Last modified: 2020/01/19 14:45 by 127.0.0.1