CS 121 Computer Science I (C++ Programming)

 

Instructor: Danny Hardin
Office and Hours: Tech Hall N327 or N329 (Monday & Wednesday 3:00 - 5:30)
e-mail:hardindm@gmail.com

Help is also available from the Help Desk and the GTA for CS 121.

Graduate Assistant: Justin Terry
e-mail:jdt0007@uah.edu
Justin will be attending class to assist you and you can e-mail him for additional help.

CS Help Desk N330
CS 121 GTA: Binaya Shresta
e-mail: brs0008@uah.edu
Hours:
Tuesday: 12:45 to 14:15
Wednesday: 12:00 to 14:00
Thursday: 12:45 to 14:15


Text: Programming and Problem Solving with C++ Sixth Edition - Dale and Weems

Download Microsoft Visual Studio Ultimate FREE from Microsoft
Get Visual Studio from UAH for FREE - Unlimited Use



 

Grading

Exams: 50% - Two exams (15% each) and final (20%)
Final Exam: (Wednesday Dec. 10, 11:30 - 2:00)
Homework & Projects: 40% - Assignments from textbook plus additional problems.
Class Attendance & In Class Exercises: 10%

Keep all your homework and programming assignments NEATLY ORGANIZED in a folder or soft cover binder. Always provide a paper copy of any programming assignments.

 

Course Goals:

CS 121 - Computer Science I

Hours: Review of hardware and software components of computer systems. Review of problem solving techniques and algorithm development. Principles of software design, implementation, and testing. Introduction to object oriented design and the C++ programming language. Extensive programming assignments to provide experience in the application of design and implementation principles. Prerequisites: CS 102 or other college-level programming course, MA 112. Prerequisite with concurrency: MA 113. 

After completing CS121 Computer Science I, you should

  • be familiar with computer systems, current techniques and tools
  • understand simple computer program design and  implementation with C++
  • know major computer program constructs such as conditionals, loops, functions and simple data structures such as arrays and user defined types in the C++ Language
  • understand how to translate real world problems into computer programs
  • have a strong enough background to be able to begin working with pointers, structures, C++ classes and object oriented programming

Complaint Procedures:

If you have difficulties or complaints related to this course, your first action usually should be to discuss them with the teacher.  If such a discussion would be uncomfortable for you or fails to resolve your difficulties, you should contact Dr. H. S. Ranganath, Chair of the Computer Science Department. Tech Hall N300, 256 -824-6088. 

If you still are unsatisfied, you should discuss the matter with Dan Rochowiak, Associate Dean of the College of Science.  The Associate Dean's office is MSB C206, telephone number is 256 824 6844 and email address is rochowd@uah.edu.

Students with Disabilities:

Your instructor would like to hear from anyone who has a disability that may require a modification of seating, testing, or other class procedures. Please see instructor after class or during office hours to discuss appropriate modifications. You should also contact Disability Support Services in Madison 131 (Ph. 824 1997) for further assistance.

UAlert Emergency Notification System

UAHuntsville has implemented the UAlert emergency notification system.  UAlert allows you to receive time-sensitive emergency messages in the form of e-mail, voice mail, and text messages.

Everyone who has a UAHuntsville e-mail address will receive emergency alerts to their campus e-mail address.  In order to also receive text and voice message alerts, you are asked to provide up-to-date phone contact information.  Participation in UAlert text and voice messaging is optional, but enrollment is strongly encouraged.  You can’t be reached through UAlert unless you participate.  The information you supply is considered confidential and will not be shared or used for purposes other than emergency notification. 

To review your UAlert account, add or update phone and alternate e-mail addresses, and set the priority for your contact methods, please visit the UAlert web site:  http://ualert.uah.edu.


Additional Class Materials:

Two Storage Devices (Memory Sticks or CD)
You should have at least two copies of all your files for this class. Always keep a backup for safety in case one of your devices fails, becomes lost, or you accidentally delete required files. You MAY be asked to turn in your flash drive containing C source code or Visual Studio project files. Typically homework will consist of a printout of your C source code along with screen captures showing the operation and output generated by the program.

REMEMBER!

Make sure that your name is on every item turned in.
Make copies of your files. It is also likely that you will accidentally delete files on occasion. KEEP A BACKUP!
SAVE YOUR WORK OFTEN!

 

UAH Course Policy

Official UAH Computer Science Department Policies and Procedures

The following policies are adapted from the general policies of the Computer Science Department:

Attendance: Regular class attendance is required. You are responsible for all material covered in class, regardless of whether or not it is in the textbook, as well as for any announcements, assignments, or other class content. If you miss a class you are responsible for obtaining the missed assignments from a classmate.

Assignments: There will be numerous programming and written assignments. The assignments are crucial to your success in this course and you are expected to complete them all. Any assignment not turned in on time will receive a grade of zero. If you anticipate difficulty completing an assignment on time, make arrangements with the instructor before the assignment due date. Assignments are to be turned in at the BEGINNING of class on the date due. You will receive program and homework assignments well in advance of their due date.

Tests and Exams: Makeup exams will be given only if you have made prior arrangements with the instructor, and only if you have a valid reason for missing the test, such as illness, business trip or UAH athletic participation.

Incompletes: A grade of Incomplete is assigned by the instructor when a student, due to circumstances beyond his or her control, has not satisfied some requirement of the course. An example of a legitimate circumstance is an illness which prevents completion of a final program. If you have fallen behind in a class due to work, family obligations or other course work the appropriate solution is to withdraw from the course.

Withdrawals: The University policy for withdrawing from a class is as follows: through the eighth week of the Fall or Spring Semester a student may withdraw from any course. After the eighth week, a student may withdraw from a course only under extenuating circumstances and with the approval of the dean of the college in which the student is enrolled. Any student failing to follow the established procedure for withdrawal will continue to be enrolled in the class and may receive a failing grade in that course.

Software: You may develop your programming assignments on any computer, using any software, but they must run under Microsoft Visual Studio 2012 in the classroom (N327) or lab (N329).

 

Week

Material

Class Topics and Homework Assignments

1
(Aug. 20)

Lecture

 

Course Overview

Syllabus
Class Rules, Grading
Computer account application
How to use Visual Studio 2012 in this Course ( A Detailed Description )

Reading Assignment:
Read Chapter One

Overview of Programming and Problem Solving

C++ TEMPLATE ( C++ Program )

2
(Aug. 25-27)

Chapters 1 & 2

Introduction to Algorithms, Program Structure, Input & Output

Visual Studio
Problem Solving Approaches
Program Development
Architecture
C++ Program Structure, cin, cout

Data types, Identifiers, Constants

Escape sequences: \n, \t, \", \\
Area and Perimeter
Formatted Output

Reading Assignment: Chapter 2

Homework Assignment One: (Download Here)
Due: September 3.

IN CLASS PROGRAM SOLUTIONS
Hello World - First C++ Program ( C++ Program )
Area and Perimeter - cout ( C++ Program )
Area and Perimeter - cin added for input ( C++ Program )
cout format options ( C++ Program )


3
(Sept. 3)

Chapter 3

cout Formatting Options, Output to Files

cout formatting - continued
Writing to a file


DATA FILES
Simple Temperture File
UAH Text File
Dictionary of four letter words
Weather Station Data - (Courtesy NCDC)
Lightning Data from NASA

IN CLASS PROGRAM SOLUTIONS
cout format options - part 2 (C++ Program )
cin & cout employee data ( C++ Program )
Writing data to a file ( C++ Program )

Homework Assignment Two: (Download Here)
Due: September 10.

HOMEWORK TWO SOLUTIONS
1. Temperature Table ( C++ Program )
2. Book List ( C++ Program )
3. String Operations ( C++ Program )
4. Swap UAH with UAHuntsville. ( C++ Program )

4
(Sept. 8-10)

Chapter 4

String Processing, File Input

Characters and Strings
Library functions for string processing:
Length, size, find, substr, at

IN CLASS PROGRAM SOLUTIONS
Copy UAH Text - File input and file output ( C++ Program )
Copy UAH Text - with getline this time ( C++ Program )
String Operations: length, size, find, substr, at ( C++ Program )
String Operations on Input: getline, get, putback, peek ( C++ Program )
The booklist program from homework two. ( C++ Program )


5
(Sept. 15-17)

Chapter 5

Review Homework Assignment Two

IN CLASS PROGRAM SOLUTIONS
ASCII Character Table ( C++ Program )

Homework Assignment Three - UPDATED : (Download Here)
Due: September 29.

HOMEWORK THREE SOLUTIONS
1. Spell Check ( C++ Program )
2. Palindrome ( C++ Program )

3. Find Word Puzzle( C++ Program )
4.a Filter bad data records from weather station data file. ( C++ Program )

4.b Subset data to four columns ( C++ Program )
4.c State High and Low with Station Names ( C++ Program )
4.d North AL Weather Stations Only ( C++ Program )


IN CLASS PROGRAM SOLUTIONS
Weather Data Input - Partial Homework Solution UPDATED ( C++ Program )

File with Bad Data Records Deleted ( Text File )

6
(Sept. 22-24)

Chapters 6 & 7 & 11

Arrays: One Dimension, Two Dimensional
The If - Else if - Else Statement & Switch
Loops: While, Do-While, For

IN CLASS PROGRAM SOLUTIONS
One Dimensional Arrays Introduction ( C++ Program )
Array Operations Arrays ( C++ Program )
Dictionary Array with application ( C++ Program )


CSHELLS
Weather Station Subset: Homework Problem 4b ( C++ Program )
North AL Weather Station Data: Problem 4c ( C++ Program )



7
(Sept. 29 - Oct. 1)

Chapters 8 & 9

Arrays: Single and Multiple Dimensioned
Functions

8
(Oct. 6-8)

 

EXAM I: October 8 ( Study Notes )

EXAM PROGRAM SOLUTIONS
Problems 1 and 2 ( C++ Program )
Problem 3. Unique Numbers ( C++ Program )

9
(Oct. 13-15)

Supplemental

Sorting and Searching

CSHELLS
Sorting ( C++ Program )
Debug ( C++ Program )

IN CLASS PROGRAM SOLUTIONS
Sorting array of numbers with Bubble Sort( C++ Program )
Sorting with Selection Sort - with binary search ( C++ Program )



10
(Oct. 20-22)

Chapters 8 & 9

Functions

CSHELLS
User Defined Functions - validate ( C++ Program )
Functions with arrays as parameters ( C++ Program )
Scope Rules ( C++ Program )
Recursion - Factorial ( C++ Program )

IN CLASS PROGRAM SOLUTIONS
Functions - Validate ( C++ Program )
Functions with Array Parameters - Partial Complete (C++ Program
)
Scope Rules - Complete ( C++ Program )
Recursive Factorial (C++ Program )

Homework Assignment Four: (Download Here) Due: Oct. 29.
Homework Assignment Five: (Download Here) Due: Nov. 5.

PARTIAL SOLUTION HOMEWORK FIVE
( C++ Program )

CS 121 Class Project (Download Here)
Function Library for Class Project (Download Here - C++ Code)

11
(Oct. 27-29)

Chapter 10

User Defined Data Structures: Enumeration Types, Structures

CSHELLS
Switch Examples ( C++ Program )
Enumeration ( C++ Program )
Structures ( C++ Program )
Pointers ( C++ Program )

IN CLASS PROGRAM SOLUTIONS
Switch ( C++ Program )
Enumeration ( C++ Program )
Structures - Case I No functions ( C++ Program )
Structures - Case II with functions ( C++ Program)
Structures - Case III with array and struct elements ( C++ Program ) )

12
(Nov. 3-5)

Chapter 11

Introduction to pointers

CSHELLS
Pointers ( C++ Program )
Dynamic Memory (C++ Program )
Linked List (C++ Program )

IN CLASS PROGRAM SOLUTIONS
Pointer Introduction ( C++ Program )
Pointer Applications ( C++ Program )
Pointer Apps Arrays ( C++ Program )
Dynamic Arrays with New and Delete ( C++ Program )
Dynamic Memory with malloc, realloc
and free ( C++ Program )
Linked List Example ( C++ Program )

 

13
(Nov. 10-12)

 

Exam II Wednesday November 12 (Study Notes )
(EXAM TWO Programs)

EXAM PROGRAM SOLUTIONS
Program 1 Time Format Conversion( C++ Program )





14
(Nov. 17-19)

Chapter 12

Pointer Applications; 2-D Arrays

CSHELLS
Two Dimensional Array Introduction ( C++ Program )
Ticket Purchase (C++ Program )

IN CLASS PROGRAM SOLUTIONS
Two Dimensional Array Examples ( C++ Program )
Seat Reservation System ( C++ Program )
Seat Reservation System with Functions ( C++ Program )

Homework Assignment Six: (Download Here) Due: December 8.

HOMEWORK SIX SOLUTION - Part One ( Word Doc. )
Word Find Puzzle ( C++ Program )

15
(Nov. 24-Dec. 1)

 

Pointers; Classes and Abstraction

CSHELLS
Student Records - Take Two ( C++ Program )
Data File for Student Records program (Data File)

IN CLASS PROGRAM SOLUTIONS
Student Records Array of records ( C++ Program )
Student Records - with pointers ( C++ Program
)

C++ CLASS EXAMPLE (C++ Program)

Exam Review

FINAL
(Dec. 10)

 

FINAL EXAM (Dec. 10, 11:30 - 2:00) ( Study Notes )