CSCI 161

Introduction to Programming I

Coordinator: chris cain

Credits: 4.0

Description

Introduction to computer programming for the student intending to major in computer science or related fields. Emphasis on developing ability to apply problem-solving strategies to design and implement algorithms in a modern programming language, currently Java.

Prerequisites

Placement in MATH 151 or higher.

Course Outcomes

At the end of this course, a student will:
1. be able to use a computer system to edit, compile, and execute a program.
2. be able to design a solution to a given problem.
3. be able to write a program to implement the solution.
4. be able to use basic programming techniques including appropriate data types, conditional structures, looping structures, and expressions.
5. be able to design and use methods with parameters and return values, and basic array structures.
6. be able to use accepted style when writing a program.
7. be able to properly test a program to ensure its correctness and robustness.

Major Topics Covered

  1. Problem Solving
    1. Problem analysis
    2. Algorithm development
    3. Structured programming techniques
    4. Testing and debugging
    5. Documentation
  2. Computing at MU
    1. Hardware and software
    2. Using the computer network
    3. MU Policy for Responsible Use of Electronic Resources
    4. MU Academic Honesty Policy
    5. Creating, editing, compiling, and executing a program
    6. Debugging
  3. Programming Language Fundamentals
    1. Vocabulary
      1. Literals
      2. Identifiers
      3. Reserved Words
    2. Program structure
      1. Declarations
      2. Executable statements
  4. Data Types and Declarations
    1. Scalar data types
      1. Integer
      2. Real
      3. Character
      4. Boolean
    2. Data Declarations
      1. Variables
      2. Constants
    3. Using Common Objects
      1. Declare and instantiate
      2. Calling methods
  5. Fundamental Operations
    1. Arithmetic expressions and assignment
    2. Input from the keyboard
    3. Output to the screen
    4. Simple Graphical I/O
    5. Boolean Expressions
  6. Control Statements
    1. Sequential
    2. Loops
      1. Definite
      2. Pre-Test
      3. Post-Test
    3. Selection
      1. One Alternative
      2. Two Alternatives
      3. Many Alternatives
  7. Functions and Methods
    1. Definition and invocation
    2. Parameters
    3. Block structure and scope
    4. Return values
  8. Arrays 
    1. Declaration and initialization
    2. Traversing
    3. Passing as parameter/ return value
    4. Sequential search
  9. Files
    1. File I/O
    2. Scanning input
  10. Optional Topics 
    1. Elementary Sorting
    2. Binary Search
    3. Multi-dimensional arrays
    4. Recursion
    5. Graphical output

Sample Laboratory Projects

  1. Lab 1: This activity will introduce you to the compiler. You will type in the program shown, compile it, and execute it. You will submit that program. Then, you will copy that program, make some changes to it, compile it, and submit it.
  2. Lab 2: For this lab, you will write two programs that will both emphasize the mathematical operations that we've been discussing in class. The first program will read in two integer values and display the results of various mathematical operations using those two values. The second program will read in an integer value and calculate the minimum number of coins (quarters, dimes, nickels, and pennies) required to make change for that amount.
  3. Lab 3: For this lab, you will write two programs that will both emphasize the mathematical operations that we've been discussing in class. The first program will read in two integer values and display the results of various mathematical operations using those two values. The second program will read in an integer value and calculate the minimum number of coins (quarters, dimes, nickels, and pennies) required to make change for that amount.
  4. Lab 4: In this lab assignment, you will develop a program that will act as an account ledger for several transactions. Your program will accept a beginning balance as input from the user. It will then prompt the user to enter the account code and transaction amount for three transactions. Your program will calculate the ending balance, and based on that balance, you will calculate the amount of interest the user has earned. You should then add that interest amount to the ending balance. The expected input and output format is shown below.
  5. Lab 5: In this lab assignment, you will revise your program from the ledger lab so that it can accept as many transactions as the user chooses to input, and will test for invalid input and force the user to use valid values. You will do this by adding loops to your program. The expected input and output format is shown below.
  6. Lab 6: In this lab assignment, you will develop a program that will calculate and display a loan payment schedule. The expected input and output format is shown below.
  7. Lab 7: In this lab assignment, you will develop a program that will perform several different tasks related to loans and loan payments . This program will build on your previous lab that you've been working on. Be sure to save this assignment in a different file than your previous lab!! The expected input and output format is shown below. Your program should use function prototypes for any functions being written.
  8. Lab 8: Think of this activity as directed learning about vectors. For this lab, you will write a program that will read a series of real values representing the yearly growth of pine trees, average the values, and then print the values and their difference from the average. You must use an array to hold the values.