CIS 101 Fundamental Programming Concepts
The Java Programming Class in Walnut Creek by Symon Chang

Come to the Java course, and you will know what you missed in here. :-)

The Course Descriptions

CIS 101 FUNDAMENTAL PROGRAMMING CONCEPTS - 3 UNITS
Provides an introduction to fundamental programming concepts and methods based on the Java programming language. Designed to be a first course for students with little or no prior programming experience, it is not primarily a computer language (Java) class. Rather, it is a class in basic programming principles applicable to a variety of languages and programming environments, introducing you to the most up-to-date programming technologies including object-oriented programming, visual programming, and programming for the Internet.

Topics include introduction to computers, programming languages, and Java; problem solving using object-oriented and algorithmic development methods; good programming practices and style; primitive data types; variables; arithmetic operations; assignment operations; relational and logical expressions; branching (if/else); loop control structures (while, for, do/while); multi-way branching (switch, break, continue); debugging strategies and tools; subprograms, object-based functions (methods), arrays, exception handling, files and streams. 


Prerequisite


CIS 1 Computer Concepts and Software Systems, or consent of the Department Chair. To take this class, you should be familiar with basic computer concepts and operations. If you have any questions regarding the prerequisites for this course, please see the instructor as soon as possible!

Text Book


Java Software Solutions by: John Lewis & William Loftus, Addison Wesley, 1998 

This course will cover


See some applet examples that will be covered in this class, in addition to what we have in the textbook. 

Course Format



Instructor


Instructor Symon Chang has taught many Java classes in US, and published many Java articles on computer magazines in Taiwan. 


Homework Assignments


Week 1


NOTE:

If you install JDK 1.2 on Windows, read this page first. The size of JDK 1.2 is 20 MB. It will take 2+ hours to download under slow dial-up link.

If you are using your home machine, follow the instructions for that compiler/interpreter. You will need to create a text file called Test.java and put these contents in it:

class Test {
   public static void main (String []args) {
       System.out.println("Testing the Emergency Broadcast " +
                          "Program ");
   }
}   

Open a DOS window, and make sure you set the path:
SET PATH=c:\jdk1.1.7\bin;%path%

Where the c:\jdk1.1.7 is the directory that you install your JDK under.

Then you should use the Java compiler (which is called javac) to compile it. Try this:

javac Test.java 

If everything is ok, you'll just get the prompt back. If there are errors in your code look at the error messages, fix the bugs, and try again. The result of a successful compilation is a .class file, so you should have Test.class in your directory now.

To run the program, you need to invoke the Java interpreter on the resulting class (which is called Test). So use:

java Test

This should cause the program to run and print the message on the terminal. Note that you do not put the name of the file that has the compiled class in it, you put the name of the class.

Note: If you want to know more in how to get start with Java, check here...

Note: If you have problem with classpath, check here...


Week 2


Note: Problem 3.17 requires some design.

To set-up your DOS windows for the Java class, you need to copy MS-DOS windows Icon from your desktop, and rename it to Java MS-DOS Window. Then, you need to change the properties of the Java Window. This will look like this....

The setjdk.bat file will look like this:

doskey
SET PATH=c:\jdk1.1.7\bin;%path%
SET CLASSPATH=.;c:\jdk1.1.7
We have a news group now. Please check this web page , or visit GGU Page.

Check here for pre-quiz problem .

Week 3


NOTE: Some questions and answers:
  1. Q: Is there an easier way to indent lines of output?
  2. A: Try "\t" for tab.
  3. Q: What is "continue;" in the sample homework answer?

  4. A: See page 199 of the textbook.
  5. Q: What is "this(0);" in our sample program?

  6. A: Use "this(0)" to call other constructor in this class. "this" is also a reference to current object. See page 160 of the textbook.
  7. Q: Why I got this error:
  8. homework.java:7: Invalid method declaration; return type required.
    public AccountNumber(int bal) {  //constructor
           ^
    A: You must use the same name of your class for constructor.

Week 4



Week 5


NOTE: See AwtField.java for how to enter text field.


Week 6


NOTE: The second midterm is on 02/23/99. Questions on the second midterm will be based on this homework assignment.

Also, the following two programs are important for the second midterm:


Other Notes


How to create your own Web pages

Important Java Links



Students' Web Page



Sample Student Homework


Homework Example I -- TAICHI Applet by: Cynthia


Animation of the Tai Chi Symbolic Sign. The sign rotates, zooms in and out on screen.


Homework Example II -- Chaser Eraser by Ken


JUST FOR FUN - Here is a game: try to draw a picture without it being erased as you draw.

Simple java applet that responds to mouse events (draw lines) and uses a thread to perform some automation (chase cursor) 



[ ?????? Back to Home | Previous Page | Next Page | Any Page ]
Symon Chang ?????? Symon & Associates, CA. U.S.A symonchang@earthlink.net

Last modified: 02-12-99