Sei sulla pagina 1di 2

IT104

Introduction to Programming

HW and Lab 1

Unit 1: Fundamental Concepts


Objectives
1: Describe the fundamental concepts in computer programming. 1.1: Describe the role of software for computers. 1.2: Identify the hardware associated with a computer. 1.3: Describe how computers store data. 1.4: Explain how programs work. 1.5: Differentiate among machine language, assembly language, and high-level languages. 1.6: Differentiate between compilers and interpreters. 1.7: Identify the different types of software.

Content Covered
Starting Out with Programming Logic & Design: Chapter 1

Key Concepts That Must Be Covered in Class


The following key concepts must be covered in class in order to achieve the course objectives. 1. Role of software and how it works 2 How data is stored 3. Types of software, programming languages 4. Compilers vs. interpreters

Homework
Assignment 1.1: Answer the following questions in Chapter 1 of your textbook, Starting Out with Programming Logic & Design: Multiple Choice Review Questions 5, 14, 15, 21, and 24, starting on page 23 Short Answer Review Questions 1 and 6 on page 26 Submit your paper in a Word document using 12-pt. Times New Roman font to your instructor at the beginning of the next class session.

IT104

Introduction to Programming

HW and Lab 1

Labs
What are the steps? Procedure 1. Writing programs requires a lot of planning. A programmer needs to plan out: data required by the program the process that needs to be conducted on the input data the output required by the program. Such considerations are very importantif the program does not store the necessary data in memory before it is needed, the program will not be able to do the processing it needs to generate the required output. For the following example, consider a calculator that stores data in up to 30 different memory storage locations (M1, M2, M3, M30) as follows: Example #1: A program to calculate the perimeter of a square using the calculator Input: Store length of a side in memory location M1. Process: Calculate perimeter: M1*4 Output: Display perimeter of the square. Example #2: A program to calculate order totals for buying shirts using the calculator Input: Store price of shirt in memory location M1. Store number of shirts in memory location M2. Store sales tax rate in memory location M3. Process: Calculate total before tax and store in memory location M4: M4 = M1 * M2 Calculate total sales tax and store in memory location M5: M5 = M1 * M2 * M3 Calculate total including tax and store in memory location M6: M6 = M4 + M5 Output: Display order total before tax, total sales tax and total including tax. 2. Map out the Input, Process, and Output steps for the following programs: Problem #1: A program to calculate order totals for buying five different models of laptops using the calculator. Assume the different models all have different prices but the same sales tax rate. Problem #2: A program to calculate personal income tax using the calculator. Assume you can get up to five different income tax deductions. 3. Submit your answers in a Word document using 12-pt. Times New Roman font to your instructor at the beginning of the next class session - Unit 2.
2

Potrebbero piacerti anche