Lesson 1

Due Date October 15, 2007

Read pages 2 to 11 in the Purple textbook C++ Basics by Todd Knowlton

Write a paragraph for each of the Objectives on your. Copy and paste into MS Word or Google Documents. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).


  1. Describe the various types of computer programs.
  2. Describe the role of the operating system.
  3. Describe how computers get instructions.
  4. Describe the role of a programming language.
  5. Describe the role of high- and low-level languages.
  6. Describe the role of interpreters.
  7. Describe the role of compilers.
  8. Describe how to select a programming language


Due Date October 16, 2007

Define the Vocabulary terms.  Copy and paste into MS Word or Google Documents. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).

algorithms  assembly code   compiler   executable file  graphic user interface (GUI)  high-level language  
linker   low-level language   machine language  
object code   object file   operating system  
programming language   source code

Due Date October 18, 2007

Complete the lesson 1 Review Questions. Copy and paste into MS Word or Google Documents. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).

Lesson 1: Review Questions

True/False

Type True if the statement is true. Type  False if it is false.

1.   A word processor is an example of an application program.
2.   The programs in a typical computer’s ROM provide programs such as spreadsheets and  video games.
3.   The operating system controls input and output operations of a computer.
4.   An instruction set is a system for interacting with computer users through pictures.
5.   A compiler creates a source code file.
6.   The programming language most like machine language is C++.
7.   Programs written in low-level languages usually require less memory than those written in high-level languages.
 8.   High-level languages are more difficult to read than low-level languages.
9.   An interpreter creates an object file that a linker makes into an executable file.
10.   Most modern compilers are programs that must be run separately from the linker.

Written Questions

Write your answers to the following questions.

11.  What does the acronym ROM stand for?
12.  List three operations managed by operating systems.
13.  What is the device that processes the instructions in a computer?
14.  What is the name of the number system commonly used to represent the state of being on or off?
15.  Give an example of a low-level programming language.
16.  List three examples of high-level programming languages.
17.  List two advantages of a low-level language.
18.  Describe the process involved when using a compiler to program a computer.
19.  Describe one advantage that compiled programs have over interpreted programs.
20.  Why is it important for professional programmers to have worked with various programming languages?


Due Date October 18, 2007

Go to Introduction to Xcode to learn how to write your First C++ Program.


Lesson 2—Entering, Compiling, and Running a C++ Program

Read pages 15 to 28 in the Purple textbook C++ Basics by Todd Knowlton

Due Date October 22, 2007

·         Study the objectives for the lesson.  Write a description for each of the Objectives.



Due Date October 25, 2007

Follow the directions to create your first C++ program using  Xcode.   Turn in the your program in the ICA (http://www.nicenet.org/).

·         This lesson gives you the chance to create your first C++ program. You will learn about the structure of a C++ program, enter source code, compile and run the program, and modify the source code. You will also learn how to run a standalone program creating by your C++ compiler.

·         As a guide to new vocabulary, examine the Vocabulary list at the beginning of the lesson. The glossary is also an excellent reference for terms in this lesson.

·         The purpose of the sidebar items that are embedded within the text throughout the lesson is to provide users with important background information, both technical and historical. Boxed items occur under these different headings throughout the book: Concept Builder, Did You Know?, Hot Tip, Important, and Note.

BEGIN

Due Date October 26, 2007
Complete the Vocabulary Review on page 23
Copy and paste into MS Word or Google Documents. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).

braces   case sensitive   comments   compiler directives   functions   header file    lowercase   main function   statement   uppercase



·        


Complete the Lesson 2 Review Questions on pages 24–25. Copy and paste into MS Word or Docs & SpreadsheetsDocs & Spreadsheets. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).

Due Date November 2, 2007

Lesson 2: Review Questions

Type True if the statement is true. Type  False if it is false.

  1. Comments begin with .
  2. Comments may appear on the same line with program statements.
  3. Compiler directives are not part of the C++ language.
  4. The .hfl extension indicates that the file is a header file.
  5. The parentheses after the word main indicate to the compiler that it is a function.
  6. The int keyword that appears before the word main indicates that the function is an internal function.
  7.  It is a good idea to align the opening and closing braces in source code to improve readability.
  8. Every C++ statement ends with a colon.
  9. Capital letters are called uppercase letters.

Write your answers to the following questions.

  1. List four uses for comments.
  2. What is a function?
  3. What purpose do braces serve?
  4. What does the term “case sensitive” mean?
  5. What company developed the compiler you are using?
  6. What is the name of the compiler you are using and its version number?
  7. What command or commands are used to run a program with your compiler?
  8. What command opens a source code file from a disk?
  9. What command saves a source code file?

ASSESS

·         Quiz on  Friday.


Unit 1: Review Questions

Copy and paste into MS Word or Docs & SpreadsheetsDocs & Spreadsheets. Type the Answers in a different COLOR. Turn in the assignment in the ICA (http://www.nicenet.org/).

Due Date November 6, 2007

Write the letter of the description from Column 2 that best matches the term or phrase in Column 1.

Column 1                                           Column 2

_____      1.    algorithm                                       A.    The set of commands a microprocessor is made to understand

_____      2.    assembler                                      B.    A program that links object files created by a compiler into an executable program

_____      3.    compiler                                         C.    A program that reads assembly language and converts it into machine language.

_____      4.    executable file                               D.    A program in the form of a high-level language

_____      5.    instruction set                              E.     A program that translates a high-level language into machine language but does not save the machine language

_____      6.    interpreter                                      F.     The device in the computer that processes the instructions

_____      7.    linker                                              G.    A set of sequential instructions followed to solve a problem

_____      8.    microprocessor                             H.    The machine language code produced by a compiler

_____      9.    object code                                   I.      A program that translates a high-level language into machine language, then saves the machine language

_____    10.    source code                                  J.     The output of a linker

Write your answers to the following questions.

   1.  What is an application program?
   2.  What is the purpose of the binary number system?
  3.  What kinds of programs are usually found in a computer’s ROM?
   4.  Why does a program written in a low-level language typically require less memory?
   5.  Is PASCAL a high- or low-level language?
   6.  What term refers to correcting programming errors?
   7.  What character or characters tell the compiler that the text to follow is a comment?
   8.  What character is used to end a C++ statement?
   9.  What is the file extension typically used to signify a header file?
10.  When a C++ program is executed, what function is run first?

Lesson 3—Variables and Constants  1600 Points total

Read pages 30 to 45 in the Purple textbook C++ Basics by Todd Knowlton

Lesson 3 Vocabulary 100 Points Turn in on Nicenet.

Due November 29

Study the objectives for the lesson.Type each objective. Write a sentence for each of the Objectives - Turn in on Nicenet.

·         This lesson introduces you to variables and constants. You will learn about integer data types, character variables, and Boolean variables. You will also learn how to declare, name, and initialize variables and constants.

·         As a guide to new vocabulary, examine the Vocabulary list at the beginning of the lesson. The glossary is also an excellent reference for terms in this lesson.

·         The purpose of the sidebar items that are embedded within the text throughout the lesson is to provide users with important background information, both technical and historical. Boxed items occur under these different headings throughout the book: Concept Builder, Did You Know?, Hot Tip, Important, and Note.


ASSIGNMENTS

Lesson 3 Vocabulary 100 Points Create a new page on My sites Write your answers in complete sentences. ·     

·         Complete the Vocabulary Review on page 42
  1. ASCII -
  2. Boolean Variable -
  3. Characters -
  4. Constant Type -
  5. Data Type -
  6. Declaring -
  7. Exponential Notation -
  8. Floating-Point Number -
  9. Identifier -
  10. Initialize -
  11. Integer -
  12. Keyword -
  13. String -
  14. Variable -


Lesson 3 300 Points Use Xcode  Take a screen shot of each completed step.

Name each step (3.1, 3.2, etc.). 

Upload Lesson 3—Variables and Constants page on My sites .

Due December 4

·         Read pages 30–31
·         Complete Step-by-Step 3.1
·         Read pages 32–33
·         Complete Step-by-Step 3.2
·         Read pages 34–35
·         Complete Step-by-Step 3.3
·         Read pages 35–36
·         Complete Step-by-Step 3.4
·         Read pages 37–38
·         Complete Step-by-Step 3.5
·         Read pages 39–40
·         Complete Step-by-Step 3.6
·         Read the Summary on pages 41–42
·         Complete the Lesson 3 Review Questions on pages 42–43


Lesson 3: Review Questions 100 Points  Turn in on Nicenet.

Due December 5

True/False

Type True if the statement is true. Type  False if it is false.

1.   An integer is a number with digits after the decimal point.
2.   The unsigned char data type has a range of values of 0 to 255.
3.   Each char variable can store one character.
4.   Variables must be declared before they are used.
5.   Identifiers must start with a letter or a numeral.
6.   Underscores are not allowed to be a part of an identifier.
7.   Variables must be initialized because they have an indeterminant value when declared.
8.   A constant is data that remains the same as the program runs.
9.   Constants do not have data types.
10.   Constants must be named with uppercase characters.


Lesson 3: Written Questions 200 Points
       
 
Complete the Vocabulary Review on page 42

Write your answers to the following questions.

Write your answers in complete sentences.
·

11.  Why is it important to use data types that store your data efficiently?
12.  What floating-point data type provides the most digits of precision?
13.  What is a string? 
14.  What are words called that cannot be used as identifiers because they are part of the C++ language?
15.  Why can’t “first name” be used as an identifier?
16.What character is used to assign a value to a variable? 
17.  What is a constant?
18.  What keyword is used to declare a constant in C++?
19.  When is it appropriate to use constants? 
20.  When must the value of a constant be assigned?


Use Xcode to: Complete the Lesson 3 Projects (on pages 44–45)
Take a screen shot of each completed step.

Name each step (3A, 3B, & CTA). 

Upload Lesson 3—Variables and Constants page on My sites .

Project 3A 200 Points
Project 3B
200 Points
Critical Thinking Activity on page 45
200 Points 


·         After completing this lesson, ask your instructor for the assessment information.Quiz 200 Points Due December 20



Lesson 4—Math Operations

Read pages 46 to 56 in the Purple textbook C++ Basics by Todd Knowlton

Lesson 4 Vocabulary 100 Points Turn in on Nicenet. Due January 3

  As a guide to new vocabulary, examine the Vocabulary list at the beginning of the lesson. The glossary is also an excellent reference for terms in this lesson.

  1. ++ operator
  2. -- operator
  3. arithmatic opereators
  4. assignment operators
  5. decrementing
  6. expression
  7. incrementing
  8. modulus operator
  9. order of operations
  10. quotient
  11. remainder


Lesson 4 Objectives 100 Points Turn in on Nicenet. Due January 4

Study the objectives for the lesson.Type each objective. Write a sentence for each of the Objectives.·

This lesson introduces the assignment operator (=) and the arithmetic operators. You will learn how to use operators in output statements, increment and decrement variables, and use the order of operations to predict how expressions will be evaluated by the compiler.



The purpose of the sidebar items that are embedded within the text throughout the lesson is to provide users with important background information, both technical and historical. Boxed items occur under these different headings throughout the book: Concept Builder, Did You Know?, Hot Tip, Important, and Note.

Lesson 4 300 Points Use Xcode  Turn in on Nicenet. Due January 9
·         Read page 46
·         Complete Step-by-Step 4.1
·         Read page 47
·         Complete Step-by-Step 4.2
·         Read pages 48–49
·         Complete Step-by-Step 4.3
·         Read pages 50–51
·         Complete Step-by-Step 4.4
·         Read pages 51–52
·         Complete Step-by-Step 4.5
·         Read page 52
·         Complete Step-by-Step 4.6
·         Read page 53
·         Complete Step-by-Step 4.7
·         Read page 54
·         Complete Step-by-Step 4.8
·         Read page 55
·         Complete Step-by-Step 4.9
·         Read the Summary on page 56

LESSON 4: True/False 100 Points Turn in on Nicenet.  Due January 10

Type True if the statement is true. Type  False if it is false.

1.   Variables can be declared and initialized in the same statement.
2.   You can initialize multiple variables to the same value in the same statement.
3.   The * operator performs multiplication.
4.   The modulus operator is the @ sign.
5.   C++ allows you to divide by zero.
6.   Subtracting 1 from a variable is called incrementing.
7.   You can increment and decrement variables without the ++ and -- operators.
8.   The ++ and -- operators do not work on floating-point numbers.
9.   The ++ operator can appear before or after a variable.
10.   Addition and subtraction are performed before multiplication and division.

LESSON 4: Written Questions 200 Points Turn in on Nicenet. Due January 11

Type your answers to the following questions.

11.  What is the assignment operator?
12.  When using the assignment operator, on which side of the operator must you place the variable getting the new value?
13.  What symbol is used to represent the division operation?
14.  What symbol is used to represent the subtraction operation?
15.  What does the modulus operator do?
16.  When is it not a good idea to perform calculations in output statements?
17.  Using the addition operator, write a statement that is equivalent to x = x++;.
18.  If the value of i is 10 before the following statement is executed, what is the value of j after the statement?
j = i++;
19.  If the value of i is 4 before the following statement is executed, what is the value of j after the statement?
j = --i;
20.  What can be used to override the order of operations?


Use Xcode to:

·         Complete the Lesson 3 Projects (on pages 58-59) Turn in on Nicenet.
Project 4A
200 Points Due January 14
Project 4B
200 Points Due January 15
Project 4C 200 Points Due January 16
Project 4D 200 Points Due January 17
·         Complete the Lesson 4 Critical Thinking Activity on page 59 200 Points Due January 18


ASSESS ·     
100 Points Turn in on Nicenet.  Due January 21

   1.   What operator changes the value of the variable to the left of the operator to the result of the expression to the right of the operator?
 
   2.   What is the purpose of the modulus operator? 
 
   3.   What happens if you divide by zero in C++ code?
 
   4.   What operator increments a variable?
 
   5.   In the order of operations, what comes first, multiplication or addition?


Lesson 5—How Data Types Affect Calculations

Read pages 60 to 74 in the Purple textbook C++ Basics by Todd Knowlton

Study the objectives for the lesson.Write a paragraph for each of the Objectives on your .


MATERIALS

·         Lesson 5 of the student textbook
·         Student data file folder
·         Lesson 5 of the Activities Workbook (optional)

PREPARE

·         Study the objectives for the lesson.

·         This lesson provides more information on using correct data types in programs. You will learn how to mix data types and how to avoid overflow and underflow. You will also learn how to avoid floating-point rounding errors.

·         As a guide to new vocabulary, examine the Vocabulary list at the beginning of the lesson. The glossary is also an excellent reference for terms in this lesson.

·         The purpose of the sidebar items that are embedded within the text throughout the lesson is to provide users with important background information, both technical and historical. Boxed items occur under these different headings throughout the book: Concept Builder, Did You Know?, Hot Tip, Important, and Note.

BEGIN

Use DEV-C++to

·         Read pages 60–61
·         Complete Step-by-Step 5.1
·         Read pages 61–62
·         Complete Step-by-Step 5.2
·         Read pages 62–63
·         Complete Step-by-Step 5.3
·         Read page 64
·         Complete Step-by-Step 5.4
·         Read page 64
·         Complete Step-by-Step 5.5
·         Read pages 65–66
·         Complete Step-by-Step 5.6
·         Read the Summary on page 67

ASSIGNMENTS

·         Complete the Vocabulary Review on page 67
·         Complete the Lesson 5 Review Questions on pages 67–68


Lesson 5: Review Questions

True/False

Type True if the statement is true. Type  False if it is false.

1. Many programming languages do not allow the mixing of data types in calculations.

2. Promotion permanently changes the data type of a variable.

3. The way C++ automatically converts data types is called typecasting.

4. Assigning an integer value to a floating-point variable can result in truncation.

5. Overflow can occur only with floating-point variables.

6. Sometimes an overflow can be corrected by changing data types.

7. Underflow occurs when a number is too small for a variable.

8. Floating-point precision can affect calculations.

9. “E” notation prevents variable overflow and underflow.

10.       The float and double data types have the same amount of precision.



Written Questions

Write your answers to the following questions.

11.  When a variable of type int is multiplied by a variable of type float, which variable is promoted?

12.  After a calculation in which a variable of type float is promoted to another type, what data type does the variable retain?

13.  If a calculation results in the value 4.9, and that value is assigned to a variable of type short, what value will the variable of type short contain after the assignment is complete?

14.  What is the term that means the numbers to the right of the decimal point are removed?

15.  What operator is used to explicitly change one data type to another?

16.  Write a statement that changes the contents of a variable named radius to type float, multiplies it by 2.5, and assigns the result to a variable named A.

17.  Define overflow.

18.  What floating-point data type is the most likely to have difficulty with underflow?

19.  How would you write 6.9 × 108 in “E” notation?

20.  How would you write –3.1 × 10–6 in “E” notation?



Written Questions

Write your answers to the following questions.

   1.   What term describes the process by which data types are automatically changed to another type during a calculation?

   2.   What term describes the process by which a data type is made to change by the programmer?

   3.   What is the term used when digits to the right of the decimal point are dropped?

   4.   What term describes a condition where an integer becomes too large for its data type?

   5.   What term describes a condition where a floating-point number is so small that a data type interprets it as zero?



Use DEV-C++to
·         Complete the Lesson 5 Projects on pages 69–70
·         Complete the Lesson 5 Critical Thinking Activity on page 70

ASSESS

·         After completing this lesson, ask your instructor for the assessment information.