User Tools

Site Tools


haas:spring2013:common:cprog_assignments

Corning Community College

C/C++ Programming

Assignments, Documents, Information, and Projects

Week 13

  • The full EoCE has been released, check your Opus for details (if you don't see it, you're not logged in).
  • Last new thing: C++ Templates

Week 12

  • Time for some polymorphism. Sample code time.
    • mkdir -p ~/src/cprog/polymorphism
    • cd /var/public/cprog/polymorphism
    • cp /var/public/cprog/polymorphism/account.cc ~/src/cprog/polymorphism
    • cd ~/src/cprog/polymorphism
  • Some End of Course Experience programs:

Week 11

  • The next venue of exploration will be inheritance. There is some sample code we'll walk through.
    • cd /var/public/oop/inheritance/
    • make copy
    • cd
    • cd src/cprog/inheritance

Week 10

  • Because you've all been so awesome, I'm giving you next week off from all your scheduled classes. You're welcome.
  • More GD fun, integrating with our existing C knowledge.
  • Perhaps we'll start talking about classes today…
    • Basic Classes (Classes are really just structs with added fluff): Simple Classes

Week 9

Week 8

  • I had a request for a deeper exploration of object file linking (during the compilation process). At the same time, I thought it would be a good opportunity to start looking at file processing (reading in data from a text file). I have implemented an example which will copy itself into your ~/src/cprog/scores/ directory; to get it, simply do the following (on lab46):
    • cd /var/public/cprog/multifile/scores/
    • make copy
    • cd ~/src/cprog/scores/
    • To compile (eventually we'll want to do this for EACH source file:
      • gcc -c main.c
      • gcc -c iscores.c
      • gcc -c fscores.c
      • gcc -c display.c
      • gcc -o scores main.o iscores.o fscores.o display.o (do this just once, after compiling each .c file to a .o file).
    • Setting up for structs: prestructs.
    • Converting to use structs: structs1.

Week 7

  • Warning Grades were submitted. You received one if you met one of these criteria:
    • (1F) No/shockingly little modification to your opus
    • (1D) Opus content/modifications, but far too little, or far too long since last update.
    • The situation is easy to fix, just keep your Opus updated and filled with relevant content. Some people in the class have an EXCELLENT Opus.
  • We're going to start exploring functions and multi-file programs. I have implemented an example which will copy itself into your ~/src/cprog/exponentiator/ directory; to get it, simply do the following (on lab46):
    • cd /var/public/cprog/multifile/exponentiator/
    • make copy
    • cd ~/src/cprog/exponentiator/
    • To compile (eventually we'll want to do this for EACH source file:
      • gcc -c main.c
      • gcc -o exponentiator *.o (do this just once, after compiling each .c file to a .o file).

Week 6

Week 5

Week 4

Week 3

Week 2

  • Try out address/content code
  • Find ranges and sizes for the following data types:
    • unsigned char
    • signed char
    • unsigned short int
    • signed short int
    • unsigned int
    • signed int
    • unsigned long int
    • signed long int
    • unsigned long long int
    • signed long long int
  • Example code for both the chars can be found here.

Week 1

  • Set up screen + irssi to get on the class chat.
  • Type in, compile, and study the Hello, World! example.
  • Set up Personal Lab46 Mercurial Repository
  • Type in, compile, and study the first data type example code.
haas/spring2013/common/cprog_assignments.txt · Last modified: 2013/04/24 14:58 by 127.0.0.1