| Date | Topics/Activities |
Thursday January 28 |
Starters
- Collect Homework
Main Activity
- C Programming Test (4-parts)
Summary:
- Where to go for extra time: Library today from 12:00-1:30
or make other arrangements before leaving class
Homework:
- Review
Linux Commands/Concepts for quiz Friday
- Review Term II Assignment List MidtermAssignments.pdf
|
Tuesday January 26 |
Starters
- Collect homework that was due today: Linux Lab 2
Summary:
- Review materials available for practice and review (HWMath.net/IBCS)
- Hand out the C Test Preparation documents
Homework:
- Complete handout: C Programming Check List
File: C-Programming-Check-List-1.pdf
- Read handout C Test Preparation
File: C-Programming-Test-Preparation.pdf
- Complete classwork from today
- Prepare for C Test for Thursday Janaury 28
|
Friday January 22 |
Starters
- Collect and check the homework that is due today
Summary:
- Schedule for next week
- Tuesday - due Linux Lab 2
Tuesday - C Programming review and practice; class time and homework
- Thursday - Test C Programming
- Friday - Quiz #2 Linux Commands from Linux Lab #2
Friday - Makeup quiz Linux Commands from Linux Lab #1 (homework)
Homework:
- Complete Linux Lab 2 from today's classwork. This is due next Tuesday.
- Continue to improve your numeric conversion program - improve how it is documented, how it is
used from the command line, and how it might be more usefull for use in a batch(script) file to
convert thousands of numbers.
|
Thursday January 21 |
Starters
- Collect homework : 20 C topics to know to complete the number conversion project
- Group list of C topics
Main Activity
- Review of sharing requirements (some of you lost classwork points last week)
- Review of running the convert program (video)
- Program Evaluations
Summary:
- Upcoming assignment schedule, programming assignments, quizzes, and tests.
- Video Demo of convert running using a command line interface and using a menu.
- Summary of C Topics
To Know - Out list for class saved as a pdf.
Homework:
- Random number resource: The C function
Rand
- The rand() function in <stdlib.h> returns a pseudo-random integer between 0 and RAND_MAX. You can use srand(unsigned int seed) to set a seed. If you do not set a seed to the random number generator, rand() will start with the same numbers every time you run your program. If you call seed with the same parameter as someone else you can (and will) generate the same list of random numbers.
- HW Handout HW-ProgReview01.pdf
|
Friday January 15 |
Starters
- Make sure that your partner has shared their Cloud9 workspace with Mr. Brennan and with you:
From the C9.io web site
- Open your project
- From the C9.io Window menu, select Share
- From the share form, fill in Invite People box with
C9 username: mrbrennan or email: jbrennan@isbos.org
- In the Who has access box provide Read+Write access to mrbrennan
- For graphic instructions see file ShareC9WorkSpace.pdf
Main Activity
- Continue working with your partner to complete this project
- Project Management - assessing where you are
- Project Management - assessing what needs to be done
- Project Management - assessing the order in which things need to be done (sequencing)
Summary:
- Understand each step of the project build process.
- Understand basic testing techniques, including selecting test data and using driver programs.
Homework:
- Work with your partner to complete the Menu Interface to the Convert Project
- Work with your partner to complete the command line interface to the Convert Project
- Make a complete list of C topics that have been covered during this project. Name at least 20 things that you have learned about C or that someone else would need to learn about C in order to complete this project. Have this list typed up and ready to turn in on Thursday Jabuary 21.
|
Thursday January 14 |
Starters
- Quiz 3 C Programming
- Return Quiz 2 C Programming
- Collect homework C User-defined Identifiers
Summary:
- What has been graded
- What will be graded tomorrow, what is "late"
Homework:
- Wrap up project from lab 2; be ready to have the remaining functions of YOUR code tested
- Prepare for your quiz tomorrow by focusing on your lab 2 assignment.
|
Tuesday January 12 |
Starters
- Quiz #2 C Programming
- Return Quiz: Tracing C Programs
- Collect Unix/Linux Lab 1 - Commands from the command line
Main Activity
- Presentation: Command Line Arguments
C9 Shared Workspac
- Project Requirements
- Continue working on Numeric Conversion Project
Summary:
What is a user-defined identifier?
Answer:
When we are naming variables and function and choosing our own names we are using user-defined identifiers. Sample variables that we have user are i, j, k, ch, str, ret and some function names that we have created include len, is_bool, bin2hex. Here are the rules for creating identifiers:
- Identifiers may contain only letters, numbers, and underscores.
Commonly an identifier in all UPPERCASE letters will indicate a preprocessor identifier, such as PI, or a variables whose value does not change.
- An identifier can not begin with a digit (0-9).
- C has many reserved words that can not be identifiers, such as if, int, double, return.
- An identifier such as scanf, printf or other identifiers defined in the C standard library should not be redefined; they could be, but it is not good programming practice.
- As a guideline, keep identifier names shorter that 32 letters; some compilers may allow longer identifier names, others compilers may only use the first 31 letters for identifying unique identifiers which may lead to undesired consequences,
Homework:
- Complete User-defined Identifiers handout WS-User-defined-identifiers.docx (MS Word)
- Continue working on Numeric Conversions Program
- Review all C Programming Concepts found from all examples, classes, and programs. Be prepared for a quiz on any day for any of the covered topics.
|
Friday January 8 |
Starters
- Quiz: Tracing C Programs
Main Activity
- Presentation: The switch statement
File: switchStatement.pdf
- Continue Lab 2 Team Project
- Handout Lab 2 Team Project - requirements for the main program. Your first step will be to focus on the menu.
Summary:
- Review of how the pieces will come together
- Next week will discuss command line arguments
Homework:
- The Unix/Linux lab will be collected on Tuesday. Be sure to have it ready to pass in. You may not retake Unix/Linux Quiz #1 until you have demonstrated that you have completed the lab.
- Continue work on your project. By the end of the class Tuesday you should have your individual work complete as Partner 1 or Partner 2.
- Review the agenda for this term. Any agenda items that say read, read if you have not already read. C quizzes will be almost a daily event and may include any material that is listed.
|
Thursday January 7 |
Starters
- Web Site Review
- C Programming Quiz
Main Activity
- Lab 2 Review
- Lab 2 Team Project - Introduction and day 1
Summary:
- Review of how the pieces will come together
Homework:
- Prepare for Tracing C Programs - quiz (see Tuesday's homework)
- Continue working on your part of the Lab 2 project, bring questions to class or post them online
|
Tuesday January 5 |
Main Activity
- Class Presentation
- Review Lab 2 Topics - creating libraries
- Using header files
- Linking program modules
- Testing - unit testing, system testing, creating test plans, using driver programs
- Review the compile process and the pre-processor.
- Read C Preprocessor Tutorial (web)
- Skim C Preprocessor CPP gnu.org
- Read C Variables (web)
- Complete Lab 2 Part 1
Summary:
- Status of Lab 2 Part 1
Homework:
- Tracing C Programs - practice question 2: function02.
- Use this ASCII Chart as a reference, you should also have a copy of a similar chart from class.
- Open File Tracing_C_Programs-2 (MS Word).
- Review the use of C Type Casting
- Answer the questions that are posted
- In the Cloud 9 Integrated Development Environment (IDE) you should have a workspace named sandbox. In your sandbox workspace create a new file and copy in the program listed in Tracing_C_Programs-2 . Write a main program that will test function02 and make sure that you are able to determine what the function does. You will
be given a similar question on a quiz on Friday.
- Complete Lab 2 Part 1 and Part 2: no more class time will be allocated to Lab 2 Part 1 and you will
needed Part 1 functional before you begin Lab 2 Part 2. This is due on Thursday at the start of class.
|
Thursday December 17 |
Starter:
- Quiz: Unix/Linux commands - from the handouts on Tuesday. Approximately 15 minutes
Main Activity
- Lab 2 Part I. Handout: Lab_2_Part_1.pdf
As always, read each line of the lab very carefully.
- File lab_2.c
This is a driver program for you to begin testing your library functions developed in Part I.
Summary:
- Description of Lab 2 Part II
- Description of how this will be used in Project I which you will be doing with a partner
the first week back from vacation.
- Have a fun and safe holiday season!
|
Tuesday December 15 |
Starter: Notice the link to the Google calendar at the top of the page.
- Most classes have you get resources from this web page, you are responsible for reading
the class agenda - including the homework session every day. Expect daily quizzes for
all work that should have been completed.
Main Activity
- Notes - C topics
Topics covered:
- Variable types: int, double, char, char [], boolean and discusion about arrays in general
- Functions - returning strings or character arrays - data type char *
- Type casting
- Dynamic memory allocation using malloc
- We didn't get to it - but a related function sizeof is often used with malloc.
The note pages from last week describes sizeof.
- Review this explaination about the
echostring function that we were using in class. This explains the function line by line.
Compiling notes
- Your program can have the statement#include "mrb_lib_1.h"
This contains the declaration for the len function that the echostring function uses. If you do not have a mrb_lib_1.h file in your work space you can add it, and add in the following lines:
// Name: Mr. Brennan
// File: mrb_lib_1.h
// Purpose : Demonstrate the use of include files
#include <stdbool.h>
int len(char s[]);
void print_string(char s[]);
bool is_binary(char s[]);
- To compile mrb_lib_1.c use the following command (if you do not have this file you can download it from this page from last week):
gcc -c mrb_lib_1.c
This will create an object file named mrb_lib_1.o
- When you compile your sandbox.c program, use the following command to make sure it finds the needed libraries:
gcc sandbox,c mrb_lib_1.o
This will create executable program a.out
- Execute your program using command line:
./a.out
- Handout Linux Basic Commands
Summary:
- Most of the class tome on Tuesday was spent with the C topic notes and getting the echostring function compiled and working in the sandbox.c file. If you are still having problems with this program see the file echostring.pdf
- Linix quiz on Thursday from command lists provided in class today:
File: Linux_basic-1.pdf
- Update Note for Lab 1: The fileLab_1.pdf
contains updates with more details about what should be in the header file mrb_lib_1.h, how to turn in your lab by sharing it and how the lab will be graded.
|
Friday December 11 |
Starters:
- Homework Check
- C Topics that will be covered today
- Functions (handout) Additional blank forms
- Modular programs - building programs and libraries
- header files
- object files
- linking hints
Main Activity
- Follow the directions from the class handout
- Begin your homework as time permits.
Summary:
- What we have covered, how we will proceed
Homework due next Tuesday - sooner is better:
- Create a new workspace on C9.io named projects
- Add a new file named quad.c
Write a program that will
- prompt the user for three integers a, b, and c representing a quadratic function
ax2 + bx + c
- calculate the roots
- be sure to perform input validation, let the user know when there will be only
one root (and tellthem the root) and display both resultes where there are two roots.
- This should be a conversion of your BASIC program or the one from the TI84.
- Add a loop to continue prompting the user until they enter -1 -1 -1 or some other way
for them to tell you they want to end the program.
- From the C9.io Window menu, select Share and share this with
C9 username: mrbrennan or email: jbrennan@isbos.org
|
Thursday December 10 |
Starters: C Topics that will be covered today
Main Activity
- Walk-through demo_vars1.c
The examples are in Word document file: demo_vars.docx.
- Discussion and modification: demo_vars2.c
- Compiling programs from the command line
gcc demo_vars1.c
- Running compiled program from the command line
./a.out
Summary:
- What we have covered, how we will proceed
Homework:
- Write an algorithm using pseudocode or a flow chart that will :
- Prompt the user to enter a binary number (read this in as a string)
- Validate that the string the user typed in only contains 1s and 0s
- Outputs the decimal value of the string entered by the user.
Examples:
- Input: 110 Output: 6
- Input: 0000000000000110 Output: 6
|
Tuesday December 8 |
Starter: Overview Trimester I Exam
Main Activity
- Presentation - Overview of Trimester II
- Presentation - Introduction to C Programming
- Lab 1 - Program circle.c
- Lab 1 - Instructions Lab1.pdf
Summary:
- What we have covered, how we will proceed
|