CS 111: Fundamentals of Programming I


General Information

   Professor:         Tom Whaley 
   Office:             Science Center P406
   Office Phone:       458-8813
   e-mail:             whaley@wlu.edu


   Lecture: M/W/F 11:00 - 11:55   Scienc Center G14

   Lab:     Tues 9:00-11:55    Science Center P405
		  or Tues 2:00-5:00	 Science Center P405
            
   Textbook:   Lambert and Osborne 
				Java A Framework for Programming and Problem Solving, 
				Brooks/Cole (Second Edition).

               

  Office Hours:  M/W/F 9-10 a.m. and by appointment 
  Web Page:  http://www.cs.wlu.edu/~whaleyt/classes/111/index.html 


Brief Overview

This course is the first course for students planning to pursue an extended study of computer science. Students wishing a single computer science course to fulfill the general education requirement or to get a brief introduction to computer science should consider Computer Science 101.

The major goal of this course is to give the student an introduction to computer programming. Computer science is much more than the study of programming and programming languages. However, programming provides students with tools for implementing and testing concepts covered in subsequent courses. Also, programming skills provide valuable tools for problem solving in many disciplines.

There are many different programming languages which tend to fall into broad categories called programming paradigms. Over the last few years, the object-oriented paradigm has become very popular. One popular language that falls into this category is Java. This is the language we use in this course.While there are pros and cons to any choice of languages, Java was designed to be thoroughly object-oriented. One reason for its popularity is the fact that Java programs can be run from web pages. You should know that Java is similar in many ways to C++; so the transition to this language for other courses can be made fairly smoothly.

In this course, we focus on the most basic concepts of programming in Java. This will include basic Java syntax, basic object-oriented concepts, loops, branching, simple graphical user interfaces, basic data types of Java, arrays, and some fundamental algorithms of computer science. As time permits, we may cover simple applets (web programs) and/or simple graphics.


Grading

The written work for the course will consist of

Note: All labs must be completed with grade of 50% in order to pass the course.

The grading scale will be 93-100 A; 90-92 A-; 87-89 B+; 83-86 B; 80-82 B-; 77-79 C+; 73-76 C; 70-72 C-; 67-69 D+; 63-66 D; 60-62 D-; below 60 F.


Attendance

It is very important that you attend class. There will be considerable information given in class that is not available elsewhere. At times, I will give a preview of the lab and the use of the lab software in class.

If you do not have more than 3 absences, the weight of the lowest hour exam grade will be reduced and the final will count more, if this to your advantage. For these purposes, there is no distinction between excused and unexcused absences.


General Classroom Operations


Honor System

Unless stated otherwise, the exams will be done without books or notes and without assistance from other people. Unless stated otherwise, your lab projects should be your own work. You may consult with other students concerning Java syntax, using the lab software, using the machines and network, clarification of assignments. However, the actual solution of the problem and the code produced should be done without assistance from others except the lab assistant and me. You should not look at other people's code nor should you make your code available to others.


Tentative Schedule of Lectures and Labs

 

Monday

Tuesday

Wednesday

Friday

Jan. 6
Week 1
Course introduction
Chapter 2
First Java
Lab 1 - Discuss JVM,
byte code
Lab introduction
Using BlueJ software
Terminal I/O
examples
Chapter 1 - Memory
Chapter 3
Variables,data types,
expressions
Jan. 13
Week 2
Arithmetic
Assignments
Lab 2 -Discuss
objects (Chapter 1)
Terminal I/O programs
Chapter 4
If statements
While statements
Jan. 20
Week 3
If, While examples
Chapter 5 -Strings,
menu driven programs
Lab 3 - Discuss
hardware (Chapter 1)
Programming with If,
While
Chapter 1
Binary numbers
GUIs
Jan. 27 Week 4 GUIs Lab 4
Programming with GUIs
Chapter 6
Cooperating methods
Parameters
Feb. 3
Week 5
Scope
Pre and Post
Lab 5
Programming with methods
Chapter 7
More data types and
operators
Exam 1
Feb. 10
Week 6
More control
String conversion
Lab 6
More with methods
Intro to HTML
and applets
Chapter 8
Formatting 
Feb. 24
Week 7
Chapter 9
Classes
Lab 7
Web page with applet
Classes
Examples
Static Modifier
Mar. 3
Week 8
Constructors
Copying objects
Lab 8
Using classes
Chapter 10
Arrays
Looping with
arrays
Mar. 10
Week 9
Searching and
Sorting
Lab 9
Writing classes
Working with arrays
Searching and
Sorting
Chapter 14
File input
Mar. 17
Week 10
File output Lab 10
Sorting
More files Chapter 13
Framework for
graphics
Mar. 24
Week 11
Simple graphics Lab 11
Working with files
Simple animation Exam 2
Mar. 31
Week 12
Chapter 18
Swing and AWT
Lab 11
Graphics
Swing and AWT Swing and AWT


Homework

  1. Integer operators.
  2. Binary numbers
  3. Haiku error messages


Labs

  1. Intro to Linux, BlueJ
  2. Terminal I/O, Assignments
  3. If and While statements
  4. GUIs
  5. Game simulation - One Is Zero
  6. Game strategy - One Is Zero
  7. String tokenizer, model vs. view
  8. Blackjack - using my classes
  9. Blackjack - writing classes
  10. HTML and Applets




Useful Links

This section will contain links useful for the course.


Presentations

  1. Introduction to Java
  2. Memory, variables, assignment statements
  3. If statement
  4. Object oriented concepts
  5. While statement
  6. Fibonacci Numbers
  7. Testing for Primes
  8. Char, repeating input, strings
  9. Binary numbers
  10. GUIs
  11. More on GUIs
  12. Methods
  13. Local variables, scope
  14. More operators and data types
  15. More control statements
  16. More on strings
  17. Case study: Palindromes
  18. More number limitations, String formatting
  19. Writing classes
  20. More on classes
  21. Class variables, methods and constants
  22. Introduction to arrays
  23. HTML and applets
  24. Searching and Sorting
  25. Exceptions
  26. Introduction to files
  27. Introduction to graphics
  28. Introduction to animation
  29. Scatter diagrams
  30. Recursion
  31. Quicksort