CS302 Lecture #18 Home Page
Lecturer: Mr. Schultz
Lecture Times: Tuesday Thursday 1:00 - 2:15
Lecture Room: Psychology 138
Office: Computer Sciences 1343
Office Hours: Wednesday 2:30 - 4:30
Lab Hours: Monday 2:30 - 4:30
Phone: 262-5596
Email: mschultz@cs.wisc.edu
Favorite Candy: Milky Way

In This Page: Announcements | Course Overview | Resources | Examples | Assignments

ANNOUNCEMENTS
  • The review session will be held in room 7331 from 4:00 to 5:00, and then in room 2310 from 5:00 on. (posted Thu May 15 12:56)


  • I will be holding a review session Thursday evening from 4:00 until whenever. Location TBA, but I will post the location on my office door at that time, if I don't update you sooner. (posted Wed May 14 12:30)


  • Our final exam will be Friday 5/16/03, 10:05-12:05pm, in Psychology 121. Note that this is a different day of the week, time of day, and building than our other exams. As always, show up early with your student ID cards. (posted Tue Apr 29 20:31)


  • This is a reminder that Lesson 8 is due this Friday, May 2, at 4:00 (posted Tue Apr 29 20:30)


  • An inheritance web page has been posted with all the right answers to all the questions everyone has today. It only took me 6 hours to write, so PLEASE GO LOOK AT IT!!! (posted Tue Apr 29 20:29)


COURSE OVERVIEW
CS302 provides instruction and experience in the use of an object-oriented programming language (currently Java). Emphasis is on program design and development of good programming style. This course is intended to prepare students for other Computer Science courses. Prerequisites include: Problem solving skills such as those acquired in a statistics, logic, or advance high school algebra course; or consent of instructor. CS302 is open to Freshmen.
 
 

Difficulty: CS302 can be a very challenging course.

  • Don't be misled by the course name, Introduction to Programming. Consider CS302 to be like a 300 level math course. The course requires students to have strong problem solving skills and to take considerable time outside of class.
  • Course Work: There are lessons, programming assignments, self-check quizzes, and exams.
  • Lessons are programming and/or written work that focuses on specific concepts.
  • Programming Assignments are comprehensive programming projects that require substantial time and effort.
  • Self-Check Quizzes are written work that are intended to help you prepare for exams.
  • Exams are the primary tool used for evaluating students' performance. There are two midterms and one final exam.
  • Collaboration on assignments is allowed, but collaboration may cause one to do poorly in the class. The lessons and assignments are intended to give students the practice and experience necessary to understand the course material. We expect that all students have done their own work, and we test students'  knowledge of the lessons and the assignments on the exams.
  • RESOURCES

  • Main CS302 Web Page: http://www.cs.wisc.ed/~cs302/.


  • Here's a map of the CS Building.


  • Text Book Web Page: http://www.mhhe.com/wu2/.


  • Here is a glossary of terms partially borrowed from another class, but that may be useful for you in 302.


  • Here is a primer on diagramming class, inheritance, and some object and memory diagrams.


  • Here are naming conventions for classes, object references, methods, and class constants.


  • Here is a recently made supplement web page that takes a comparative, complete, and yet top-down approach to writing classes, methods, and data in programs.


  • Here is an incomplete listing of some reserved words in JAVA.


  • This is a breakdown and comparinson of data types. The table can be found in you're text book on page 86.


  • Here is an abridged ASCII table. The table can be found in you're text book on page 357.


  • Here is a table of visibility modifiers that show the progressive levels of protection for classes.


  • Here is a table of operation precedence that you'll get for every exam.


  • Here is a page that describres the 16 different members that a class or an object can have, indicates the keyword used to desginate them as such, and explains how to draw them in class/object diagrams


  • Here is a page that exemplifies operations with differing numeric types and some example problems at the end involving order of precedence rules.


  • Finally! A step-by-step walk through of creating an instantiable class, called From Analysis To Coding. And just to see how it works, heres an example of the whole process, for one of the examples below, the Beverage class.


  • Fun with memory diagrams! Follow the coputation line by line and see how the diagram changes to reflect changes of the objects involved and their references.


  • Here's a slighlty more helpful Input and Output (io) reference page than what either your book or the online notes have. Keep in mind that anything in the online notes are the official reference, but this link here may help to clarify the subject.


  • More on Inheritance for those of you who are lost and are fond of memorization. Everything's spelled out and highlighted in blue.


  • When am I overloading/overriding/generating errors? Look here to find the answer.


  • This is my required Commenting format. There's also a link to a similar commenting guide on the red frame at the left.


  • ABRIDGED JAVADOCS
    Here is a shortened API for some common classes that we use in CS302.

        javabook2

        galapagos
    DrawingCanvas
    TurtleDrawingWindow
    Turtle
        java.lang
    java.lang.String
    java.lang.StringBuffer
    java.lang.Math
    java.lang.Object
        java.util
    java.util.StringTokenizer

    EXAMPLES

    Link To Example Description Exemplifies Author
    Rollerskate A class and object diagram to model people rollerskating class/object diagrams and the differences between them, pointers Michael Schultz
    Point a simple 2-D Point class definition and a small program that experiments with multiple constructors and the accessors and mutators, also includes one class method class/object diagram, class methods, accessor and mutators, multiple constructors, toString() method, javadoc, System.out.println() method Michael Schultz
    Taxi A Taxi class is created based upon a requirements specification that goes around servicing passengers and making money. class/object diagram, class constants, instance constants, toString() menthod, javadocs, System.out.plrintln() method Michael Schultz
    Beverage A Beverage class is defined using many different modifiers. the difference between public and private, class and instance, variable and constant Michael Schultz
    MiniatureGolf similar to assignment 1, included are all the design documents, object diagrams, and code. The only part not included is a descriuption of incremental development steps, as those are up to you. iterators for collections of objects, control statements Michael Schultz
    Calculator A non-instantiable Calculator class that behaves similarly to the Math class class/object diagram, non-instantiable classes, class methods, numeric promotion, casting, Math class, javadocs, System.out.plrintln() method Michael Schultz
    BMICalculator A program that calculates your body mass based upin your weight and your height software engineering life cycle, class/object diagram, incremental development, I/O with javabook package, java.lang.Math class Pat Votruba
    Ice Cream Scooper A program which calculates, based on mathematical volume formulas, the number of ice cream scoops that you can obtain from an ice cream tub. instantiable classes, java.lang.Math class, I/O with javabook package Jim Skrentny
    Tic Tac Toe A Tic Tac Toe game class/object diagrams, message-passing diagrams, command line output, javadocs, main method, object reference declarations, object construction, objects as arguments and return values Jim Skrentny
    Playing Dice takes user input to decide the number of sides the die will have, then rolls randomly. also has a magic 8 ball feature class/object diagram, multiple main classes, java.lang.Math.random() method, I/O with javabook package, multiple constructors Jim Skrentny
    PAGES AND EXERCISES
    Readings Exercises
    Page 1 Exercises
    Page 2 Exercises
    Page 3 Exercises
    member types
    diagramming
    Exercises
    Page 4
    naming conventions
    data types
    Exercises
    Page 5
    ASCII table
    Exercises
    Exceptions Exercises
    Input / Output Exercises
    PRACTICE PROBLEMS
    Practice Problems Answers
    Data Declaration and Assignment Answers
    Multiple Data Types: Assignment, Comparison, and Assignment Answers
    Boolean Expressions Answers
    Outside Methods Answers
    Control Flow Diagrams Answers
    Exceptions Answers
    SIMPLE PROGRAMS
    1. HelloWorld
    2. Printouts
    3. Math
    4. MyFirstObject
    5. Methods
    6. XYPoint
    7. Circle
    8. Triangle
    9. PassBall
    ASSIGNMENTS
  • Please read Page 1 and complete theexcercises for Thursday January 23.


  • Please stop by my office and drop off, on my desk, a sheet of paper containing your name and your favorite candy for Thursday, January 23.


  • Look through the rest of this web site VERY THOROUGHLY and familiarize yourself with its layout.


  • Please read Chapters 0 and 1 in the WU text book (java) by Thursday, January 23.


  • Please read Page 2 and complete the excercises for Tuesday January 28.


  • Please read Page 3 and complete the excercises for Tuesday January 28.


  • Please read the member types and the diagramming pages and complete the excercises for Tuesday January 28.


  • Please read Chapter 2 in the WU text book (java) by next Thursday, Janurary 30.


  • Lesson1 is due on, around, or otherwise extremely near my desk on Friday January 31.


  • Notify me of any exam scheduling conflicts (including for religious reasons) by Friday, Janurary 31.


  • Please read Chapters 3 and 4 in the WU text book (java) by Thursday, February 6.


  • Please read Page 4, Naming Conventions, and Data Types and complete the excercises for Thursday February 6.


  • Please do all of the Data Declaration and Assignment practice execises for Thursday, February 6.


  • Lesson2 is due on on Friday, Febreuary 7 at 4:00.


  • Please read Page 5 and complete the excercises for Tuesday, February 11.


  • Please do all of the Data Types Assignment, Comparison, and Calculation practice execises for Tuesday, February 11.


  • Please do all of the Boolean Expressions practice execises for Tuesday, February 11.


  • Please do some of the methods practice execises for Thursday, February 13.


  • Lesson3 is due on Friday, February 14 at 4:00.


  • Please look over the Simple Programs that I have added. It would be cool if you could all do those (they're not very hard) before Tuesday, February 18.


  • Lesson4 is due on Friday, February 21 at 4:00.


  • Lesson5 is due on Monday, March 10 at 4:00.


  • Please do all of the Control Statements Excercises by Spring Break.


  • Please read Chapters 8 and 9 in the WU text book (java) by Thursday, March 27.


  • Lesson5 is due on on Monday, March 10 at 4:00.


  • Lesson6 is due on Friday, April 4 at 4:00.


  • Please read Exceptions and complete the excercises for Thursday, April 17.


  • Please read I/O and complete the excercises for Thursday, April 17.


  • Lesson7 is due on Friday, April 25 at 4:00.


  • Lesson8 is due on Friday, May 9 at 4:00.


  • Last Updated:1/15/03