| Time & Place: | Ref No. 89815: Monday, Wednesday, 7:00–8:15 PM, Dale Mabry Room DTEC–427 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Instructor: |
Name: Wayne Pollock E-mail: Internet: Office & Phone: DTEC–404, 253–7213. DM Office Hours: Monday–Thursday, 3:55–5:25 & 8:15–8:30; On-line Office Hours: Wednesday–Friday, 12:00 PM (noon)–1:00 PM; or by appointment.
| ||||||||
| Text: |
Liang, Y. Daniel, Introduction to Java programming,
Seventh Edition (comprehensive version)
©2009 Pearson/Prentice-Hall.
ISBN-10: 0-13-209041-4,
ISBN-13: 978-0-13-209041-4
(Note! These ISBNs are for a bundle of two books, since the bundle is about $10 cheaper than the textbook alone. ISBN for the book alone: 0-13-601267-1) HCC bookstore on-line | ||||||||
| Description: | "Introduces programming in Java.
This course will cover the basic features of Java,
including procedural programming (datatypes, variables, operators,
control structures, etc.),
an introduction to object-oriented programming concepts
(objects and classes, abstraction, encapsulation, and inheritance),
GUI programming, applets, and error
handling view exceptions."
The class format will be lecture and discussion; class participation is strongly encouraged. In addition, there will be numerous examples and in-class group programming exercises (model solutions to these and all projects will be provided.) Students are expected to prepare for each class by completing all reading assignments, reviewing examples and model solutions provided, and practicing programming outside of class. (This is important — you can't learn a skill such as Java programming only by attending class and reading a book. You must practice, practice, practice, several hours each week! If you won't have enough time available, consider auditing the course.) | ||||||||
| Objectives: | "After completing this course, the student will be able to:
| ||||||||
| Prerequisite: | COP 1000, or Permission of the Instructor. Students enrolled in a degree or college credit certificate program must complete all prerequisites. | ||||||||
| Facilities: | All assignments can be performed on any computer that supports
Java 5 or 6.
You can obtain Sun's JDK, including all tools and documentation, for free from http://java.sun.com/. You may use any other Java development tools if you prefer, such as eclipse. However you will need your own floppy/flash disk, writing materials, and three Scantron 882–E or 882–ES forms for the exams. You can use HawkNet (WebAdvisor) to obtain your final grade for this course. You can use CampusCruiser for email, college calendars, and course (and college related) resources. HCC DM Open Lab Computers are located in the computer science department open lab in DTEC–462. Lab hours are:
| ||||||||
| Grading: |
Grading scale:
A=90-100, B=80-89, C=70-79, D=65-69,
F=0-64
| ||||||||
| Policies: |
| ||||||||
| Projects: |
Projects will be assigned from the class web page
at various times.
You will have sufficient time to complete the projects,
at least a week but usually two or more weeks.
Although there will be in-class group exercises,
you must work individually on the projects,
typically outside of regular class hours.
Programming projects are graded according to their design (25%), how well they compile and run (20%), how well your project meets the requirements specifications (20%), the coding style (15%), the amount (and quality) of your comments (10%), and your creativity in extending the project usefully, or an innovative design that uses the features taught in class well, etc. (10%). Projects are not graded when turned in. They are graded all at once, sometime after the project deadline has passed (usually the next weekend). Further details will be provided with your first project. (See also submitting assignments below.) | ||||||||
| Homework Assignments: |
Homework assignments (also known as take-home quizzes)
are assigned from the text at various times.
At the end of each chapter there are both review questionsand programming exercises. All homework questions, unless otherwise noted, are from the review questionsand not the programming exercises. You may work together in small groups (two or three people) for the homework assignments, provided the names of all who worked together are listed. Each student must still submit their own copy.
Homework assignment questions are intended to focus your studying of
the readings and to stimulate class questions and discussion.
For this reason they are generally due before the class
where that material is covered.
It is not intended that students can answer all the
questions assigned, but you must show you have thought about the
questions and read the required material in order to earn an
| ||||||||
| Submitting Assignments: |
All assignments (except when noted) should be submitted by email to
.
Please use a subject such as Java Homework Assignment #1 Submissionso I can tell which emails are submitted work. Send only one assignment per email message. Email your Java source and HTML files by copy-and-paste. (Please do not send as attachments, except when noted in the assigment directions.) Note: If you use Microsoft Outlook Express or a similar email program, please be aware that this program has a featurethat automatically converts slash-slash ( //) comments in your email to FILE://. Make sure your java source is correct before you send the email! If possible, use the textand not the HTMLmode of your email program. In the event a student submits more than once for the same assignment, I will ignore all but the last one received up to the deadline. Assignments submitted after the deadline will not count toward your grade except as allowed by the course late policy.
The HCC email server automatically accepts and
silently discards email with certain types of attachments.
For our class, the problem is with If you have an email problem you may turn in a printout instead. Be sure your name is clearly written on the top of any pages turned in. Please staple multiple pages together (at the upper left). |
| Classes Begin: | Monday 8/24/09 (First class meeting: Monday 8/24/09) |
|---|---|
| Add-Drop Ends: | Friday 8/28/09 |
| Last Day to Withdraw: | Monday 11/2/09 |
| Classes End: | Monday 12/14/09 (Last regularly scheduled class: Monday 12/14/09) |
| Grades Available: | Thursday 12/17/09 (from FACTS.org or HawkNet) |
| HCC is closed on: |
Monday 9/7/09 (Labor Day), Friday 10/16/09 (All-college Day), Wednesday 11/11/09 (Veterans Day), Thursday–Saturday 11/26/09–11/28/09 (Thanksgiving Holiday) |
If, to participate in this course, you require an accommodation due to a physical disability or learning impairment, you must contact the Office of Services to Students with Disabilities, Dale Mabry campus: Student Services Building (DSTU) Room 204, voice phone: (813) 259–6035, TTD: (813) 253–7035, FAX: (813) 253–7336. Brandon campus: voice phone: (813) 253–7914.
HCC has a religious observance policy that accommodates the religious observance, practices, and beliefs of students. Should students need to miss class or postpone examinations and assignments due to religious observances, they must notify their instructor at least one week prior to a religious observance.
| Quotes: | Tell me and I'll listen. | — Lakota Indian saying | |
|---|---|---|---|
Learning is not a spectator sport! | — Chickering & Gamson |
| Dates Mon Wed |
Topics, Assigned Readings, and Assignment Due Dates |
|---|---|
| 8/24 |
Course introduction, LAN use.
Open Lab procedures and hours.
Role of lab techs.
Java overview.
Computer, Compiler basics, JDK tools (and installation),
edit-compile-run cycle.
First Java program, console output.
OOPS, programming basics
(comments, use of white-space, program style,
main method, ...).
Readings: Chapter 1, Soft Skills |
|
8/26
8/31
|
Using import and packages.
Using Java API docs (and deprecation).
Simple applets, HTML, basic graphics
(coordinates, Graphics class methods:
drawXXX, fillXXX,
and setXXX).
Newer Graphics2D methods.
Syntax, Logic, and Runtime errors.
Readings: Chapters: 14.1–14.3, 14.6, 14.8, 14.9, On-line Java docs (glance over only!), and Java program style |
| 9/2 |
Declaring variables, identifier naming rules.
Data types.
Differences between
Java primitive numeric types and object references.
Big numbers.
Using static final for constants.
final for primitives versus for object references.
Readings: Chapters 2, 5.9, 11.12 |
| 9/7 | Labor Day — HCC Closed |
| 9/9 |
Expressions.
Converting types (cast).
Using static methods of java.lang.Math
and java.util.Random.
Working with Strings and StringBuilder.
Console input (Scanner) and simple GUI input
and output (JOptionPane).
Formatted output (PrintWriter,
printf).
Wrapper classes, auto-boxing.
Readings: Chapters 2, 8.1–8.6, 11.11 Homework 1 due 9/9: 1.4, 1.5, 1.6, 1.17, 1.20, 1.22, 1.25, 2.1, 2.3, 2.5, 2.8, 2.9, 2.10, 8.1, 8.2, 8.10, 8.14, 8.17, 5.17, 11.24 |
| 9/14 9/16 |
Control structures:
block statements, if statement, selection
operator, switch statement.
Boolean expressions, operators, and comparing integer, floating
point, and object values (especially String).
The null value.
Loops: while, do,
and for.
break and continue.
Readings: Chapters 3, 4 Homework 2 due 9/16: 3.2, 3.9, 3.15, 3.22, 3.27, 3.28, 3.32, 4.9, 4.12, 4.18, 4.19, 4.20, 4.21 Project #1 due 9/14. |
|
9/21 9/23
9/28
|
Methods (a.k.a. functions): calling, returning values,
passing parameters.
Pass by reference versus pass by value.
Method signatures and overloading.
Getters and setters (accessors and
mutators) methods, for JavaBean standard.
Design guidelines for methods: structured programming, testing,
and good comments.
Scope and lifetime: local, instance, and class variables. Memory concepts: stack, heap, review garbage collection. Recursion overview. Readings: Chapters 5, 20.1–20.2 Project #2 due 9/28 |
| 9/30 | Exam #1 |
|
10/5 10/7
10/12
|
Overview of Exceptions
(and try – catch – finally).
Arrays: declaring, using, initializing, linear search, sorting, binary search. for-each loops. 2-d arrays. Copying arrays with clone and
System.arraycopy.
Using partially filled arrays.
Using command line arguments. Readings: Chapters 6, 8.5, 23.1–23.4, 18.1–18.7 Homework 3 due 10/7: 6.3, 6.4, 6.5, 6.8, 6.13, 6.14, 6.24, 6.27, 8.20, 18.3, 18.5, 18.11, 18.18 |
|
10/14
10/19 10/21
|
Object concepts: object references and assignment,
construction of objects (constructors, classLoader,
initialization of local, instance, class (static)
variables and methods, and of objects.
Garbage collection and finalizers.
Object-orientation, design and implementation of classes. Abstraction and encapsulation. Object properties (a.k.a. fields, attributes, columns, instance variables) and class properties. Adding a test driver to classes. Immutable objects. Readings: Chapter 7 (except 7.5) Project #3 due 10/19 Homework 4 due 10/21: 7.2, 7.5, 7.6, 7.10, 7.12, 7.13, 7.18 |
| 10/26 10/28 |
Scope (part 2), this, modifiers, packages,
CLASSPATH, Java class libraries.
Commenting classes with javadoc comments and using
javadoc.
Readings: Chapters 9, 7.5, Packages (Liang PDF suppliment F) Homework 5 due 10/28: 7.7, 7.9, 9.1, 9.2 |
| 11/2 | Exam #2 |
| 11/4 |
OOP concepts: Inheritance, super,
polymorphism (overriding, Early and late binding),
instanceof.
Readings: Chapter 10 |
| 11/9 |
Interfaces, Abstract classes and methods.
Nested, inner, and anonymous classes.
Readings: Chapter 11 Project #4 due 11/9 |
| 11/11 | Veterans Day — HCC closed |
| 11/16 |
Dates, Calendar, timestamps.
ArrayLists, Sets, and
HashMaps (collections overview).
Readings: Chapters 7.5, 22.1, 24.1–24.3 Homework 6 due 11/16: 10.1, 10.3, 10.6, 10.12, 10.17, 10.18, 11.1, 11.4, 11.5, 11.15 |
|
11/18
11/23
|
Event-driven, graphics programming with AWT and
Swing.
Events, listeners (handlers), components, and containers.
Working with Fonts.
Exit status with System.exit().
Timer events.
Readings: Chapters 15, 14.10 Project #5 due 11/18 |
|
11/25
11/30
|
Graphics programming with the AWT and Swing (continued:
using layout managers, additional components and event types).
Readings: Chapter 13, 14.13, 16 Homework 7 due 11/30: 13.2, 13.5, 13.11, 13.14, 13.20, 14.1, 14.3, 14.9, 14.10, 14.12, 14.17 |
|
12/2
12/7 12/9
|
Applets: life-cycle (or milestone) methods, security,
HTML, appletviewer).
Multi-media (adding audio and graphics, using ImageIO). Creating and using jar files. Readings: Chapter 17, Using jar (Liang PDF supplement) Project #6 due 12/9 Homework 8 due 12/3: 17.3, 17.4, 17.9, 17.15 |
| 12/14 | Exam #3 |
Class name: COP 2800 (Java Programming I) Day: Monday and Wednesday Student Information Sheet Student Name: ___________________________ Student ID: _____________________________ Phone (optional): ______________________ Email (optional): ______________________ Student Certification Statement I have read and understand all of the information contained in the syllabus, and agree to abide by the conditions of this course, especially the following areas (initial each area): _____ Test Policy _____ Honesty Policy _____ Attendance Policy _____ Grading Policy _____ Class Conduct _________________________________ Student Signature
| Resources | ||||||
|---|---|---|---|---|---|---|
| Greet1.java | Traditional first program, non-GUI | HelloWeb.java | A first applet | |||
| Greeter.java | Shows creation and use of objects | On-line textbook supplements | Extra information by the textbook author | |||
| GUIGreet.java | Shows simple GUI program | HoopsApp.java | An applet version of Hoops2 | |||
| RAM Layout Graphic | Compares primitive versus object reference variables | Soft Skills | A discussion of certifications, job interviewing tips,
and required soft skills |
|||
| Type Chart | Java primitive types reference chart | MathOddities.java | A swing applet showing some tricky points of Java math. | |||
| Binary Number Chart | Tutorial for octal, decimal, hex, and binary equivalents | Round.java | Shows formatting with java.text.* formatter classes | |||
| Unicode Symbols | A few Symbols, in a fancy Java5 Applet | PrintfDemo.java | Using printf to format output | |||
| Greet2.java | Shows non-GUI simple input with Scanner | Greet3.java | Shows simple GUI input | |||
| MsgBox.java | Prints an input string in a box | MsgBox2.java | MsgBox, but uses a method | |||
| MsgBox3.java | MsgBox, but uses several methods | Overload.java | Shows overloaded method resolution | |||
| InvokeDemo.java | Illustrates different ways to invoke methods | ParamPassingDemo.java | Demonstrates passing primitives and objects to methods | |||
| Stock.java | Shows constructors | StackGoBoom.java | A Demo showing a stack overflow | |||
| Widget.java | Demo showing Java's default (no-arg) constructor | ExceptionDemo.java | Shows catching and throwing of Exceptions | |||
| Java Modifiers | A complete list of all Java modifiers | PkgDemo | How to create & use packages | |||
| Judges.java | Uses Scanner, averages | Greeter.java - Javadoc | Greeter with JavaDoc comments added | |||
| Average.java | Uses arrays, shows nums > ave | AverageGPA.java | A more realistic version of Average.java | |||
| 2D Array graphic (PNG) | Shows how 2-dimensional arrays look in RAM. | |||||
| SearchDemo.java | Shows linear and binary searching algorithms | MyGreet.java | Uses command line arguments | |||
| TryTest.java | How well do you know try-catch-finally? | StringTest.java | How well do you know Strings? | |||
| ScopeTest.java | How well do you know Scope and Lifetime issues? | ArrayTest.java | How well do you understand arrays? | |||
| RegExLab.java | Regular Expressions Lab | TwentyOne.java | A stand-alone "21" card game. | |||
| Fruit1.java | Demonstrates Inheritance | Fruit2.java | Shows overriding, polymorphism | |||
| Carnivore.java | An illustration of polymorphism | |||||
| Fruit3.java | Shows abstract classes & methods | PolymorphismDemo.java | The gory details of polymorphism: how it works under the hood | |||
| OverrideTest.java | Shows when a method is overloaded not overridden | C3.java | Shows "shadowing" of instance variables | |||
| GiftBasket.java | Shows interfaces and more | InnerClassDemo.java | Shows how to use inner classes | |||
| Nested.java | Shows simple anonymous inner class use. | Shadow.java | Shows shadowing with nested and inner classes | |||
| DateTime.java | Shows Dates, Times, and Calendars | CalendarDemo.java | Shows fields in Calendars | |||
| CollectionsDemo.java | Shows ArrayLists, Maps,
and Java5 features
| InheritTest.java | How well do you know Scope and Inheritance? | |||
| Event Chart | Shows Events, Listeners, and useful methods | EventDemo.java | Simple Applet showing AWT event handling | |||
| SimpleGUI.java | Shows windows and events | Popup.java | A pop-up window, mouse events | |||
| FrameTst.java | Shows Window controls and events. | PackDemo.java | Shows the effect of using Container.pack(). | |||
| Sketcher.java | Shows mouse events | DrawIt.java | Applet, shows almost everything GUI | |||
| SwingBtns.java | Shows some features of swing buttons. | Font concepts | Explains Font terms and concepts used in Java. | |||
| OverlapHeavy.java | Shows what happens when AWT heavyweight components overlap. | |||||
| HeavyLight.java | Shows the difference between heavyweight and lightweight Components | PaintDemo.java | Shows painting differences with heavy and lightweight components, with wallpaper | |||
| Personality.java | Shows Buttons, events (Applet) | PersonDev.java | Development Version of Personality.java | |||
| GUIGreet2.java | Shows multi-window fancy GUI | TTT.java | Tic-Tac-Toe (applet) | |||
| Smile2.java | Full Multimedia applet | SmileJar.java | Use of Jar files (Applet displays a GIF) | |||
| Smile.java | Multimedia swing applet | UIDemo | AWT User Interface Demo | |||
| PlaySnd | Play sounds without showing controls or pre-loading. (Shows how Java and JavaScript can interact.) | MediaDemo.java | Media demo app, in a clickable jar file. | |||
| DiningPhilosophers | Sun's DeadLock Thread Demo | Sort algorithm race | Sun's Multi-thread Sorting Demo | |||
| Greeter — Threads | Multi-threaded demo using Greeter.java | Swing image demo | Demo showing how to load an image from a JApplet | |||
| Hoops.java | Simple animation (GUI) | Hoops2.java | A "flicker-free" version of Hoops | |||
| Asteroids.java | Applet game with source | Guitar.java | Guitar Tuner Applet (sound demo), with source | |||
| Clock Applet | Nice Clock applet with many settable parameters | WebWar.zip | Action game with Java 1.0 source | |||
| FileKit.java | Calculates MD5 Digests of files | LoaderDemo.java | How to construct URLs to resources (in jars) | |||
| Model Solutions to Assigned Projects | ||||||
| LogoDemo.java | Swing GUI application showing fancy 2D drawing | GuessingGame.class | Simple number guessing game | |||
| TempConv.java | Temperature conversion applet | TempCon2.java | Temp. Conversion Applet w/Extras | |||
| Histogram.java | Displays a histogram (non-GUI) | TxtCrypt.java | A fancy applet to encrypt text | |||