Richard G Baldwin (512) 223-4758, NRG Room 4238, Baldwin@DickBaldwin.com, http://www.austincc.edu/baldwin/

ITSE2321 Object-Oriented Programming

This is the main web page for classroom sections and Distance Learning sections taught by Professor Baldwin at

http://www.austincc.edu/baldwin/Summer11/Itse2321WebPage/ITSE2321.htm

Main Web Page

Summer 2011

Revised 05/07/11

General

This is the main web page that will be used for communicating information between Professor Baldwin and students enrolled in this course.

This section contains very important information on many different topics in no particular order.

Use of the Blackboard online system
The online program named Blackboard will not be used for communication with students except in those cases where confidentiality is required, (such as the reporting of grades to students), posting of an occasional announcement, or the broadcasting of email messages to all students enrolled in the course.

However, the Blackboard Assignment feature is the mechanism that you will use to submit your exams.

Orientation:
All students are required to complete the online orientation.  To participate in online orientation, click on the orientation link below.

Broken Links:
Occasionally one or more of the links, which tie these online, documents together, may become broken.  If you discover a broken link, or any other problem with the online documents, please notify me as soon as possible so that I can repair the problem.

Communications via Email
If you send email to me, it is imperative that you include your name and the identification of the class in which you are enrolled (ITSE2321) on the Subject line. I normally have a very large number of students in any given semester. If I have to search the rolls to identify you, I may not answer your Email.

Spam blocking software
I receive several hundred email messages every day.  Many of the messages that I receive contain viruses or worms.  Most of the rest are SPAM.

As a result, I have been forced to become very selective regarding the messages that I am willing to open and read. I can't trust that simply because a message is received from someone that I know, it is safe to open and read.  Unless something in the Subject line of the message causes me to believe that I can trust the message, I will simply delete the message without reading it.

Therefore, if you send email messages to me, your Subject line MUST be formatted as follows:

Last name, First name, ITSE2321, Brief topic of message

When I see that format, I will trust that the message is safe to open and read.  Otherwise, I will assume that your message contains a virus or constitutes SPAM, and I will simply delete your message without reading it.

Therefore, if you want me to read your message, you MUST format your Subject line as shown above.

Telephone number

It is also important that you provide a telephone number where I can contact you. I receive many email messages from students with invalid return email addresses.

Questions via Email:
From time to time you may need to ask questions via email, and I encourage you to do so.  However, please make the question as specific as possible.  For example, "What is OOP?" is not a question that I can easily answer via email.

If you, like many others, procrastinate and save your questions until the weekend before an exam deadline, don't be surprised if you don't get a response from me until after the exam deadline has passed. The weekend before an exam deadline is not the time for you to begin trying to learn how to program in Java.

I am usually happy to answer questions about Java programming concepts at the level of this course. However, please don't ask questions about the exams (unless you believe there is a problem with one of the test files that I have provided).  It is almost certain that I won't answer them.  It isn't fair for me to answer questions about the exams from one student when all students don't have an opportunity to hear the question and the answer. After all, if I didn't give take-home exams, you wouldn't have an opportunity to ask questions anyway. Just pretend that you are taking the exam in an ACC testing center and that I am not there.

When appropriate, please illustrate your question with a short sample program.  When you send a sample program, please observe several important rules:

I am here to help you, so don't hesitate to ask for help when you need it.

I normally respond to student email messages within 24 hours except on the weekends.  If you send a message to me and you don't receive a response within 24 hours (allow 72 hours on weekends), make certain that your Subject line is correctly formatted and send the message again.

How many lessons...?
I frequently receive questions (both via Email and in the classroom) similar to the following, “How many tutorial lessons or how many textbook chapters do I need to read to be able to write the program for problem X on exam Y?”

My answer is usually something like the following, “Read (and understand) as many lessons and chapters as necessary to learn enough about Java programming to be able to write the programs or answer the questions.

If I gave true/false and essay tests in the classroom under closed-book conditions, I would feel obligated to tell you in advance how many lessons you need to understand in order to prepare for the test.  However, my tests are all take-home tests.  You have access to all of the test questions from very early in the semester.  You have access, not only to my tutorials and the textbook, but also to any book that you wish to consult, and to numerous resources on the web, in preparing yourself to successfully complete the exam.  I consider it to be your responsibility to make use of those resources in whatever manner, and on whatever schedule works best for you.

I simply provide the tutorial materials, conduct classroom lectures and discussions, answer appropriate Email questions, and establish the necessary deadlines.  (Unfortunately, deadlines are a fact of life, not only in college, but also in the workplace.)  I make no attempt to tell you how to schedule your time and your efforts.

So, before you ask, the answer is, “Consult whatever resources you need to consult, on whatever schedule you need to consult them, to learn enough about Java programming to be able to successfully complete the exams by the required deadlines (but please don’t get human assistance in the actual writing of the exam).”

Help me debug my program
Please don't waste our time by asking me to help you debug your programs.  The best way to debug is to avoid errors in the first place.  Then there won't be any bugs that require attention.

If you understand the requisite programming concepts, the only bugs that you will incur will be the result of careless errors on your part.  I won't waste my time showing you how to correct for your own carelessness.

Getting Started:
See the material in the "Hello World" lesson for instructions on how to compile and run a Java application.

Failure to Meet Prerequisites:
Please don't ask me to teach the COSC1315 Fundamentals of Programming material to you.  If you don't already understand that material, it will be your responsibility to learn it, on your own, without assistance from me.

Carelessness is costly
A few semesters back, on the last Friday of the month, which was anticipated to be one of the most active trading days of the month, programmers working on a network made a careless error and shut the NASDAQ stock exchange down for several hours.  There is no way of estimating how much this cost various people around the world.

A few months later, programmers working for a telephone company made a careless programming error and swamped the 911 emergency call center in Austin with wrong numbers for several hours.  Hopefully no one died as a result, but we will never know.

Although careless errors on exam programs may not be as costly as the errors described above, they are costly nonetheless.  In fact, the cost for making a careless error on an exam program is just as costly as not knowing how to write the program in the first place.  In either case, you get no credit for the program.  So, don't be careless.

Correct Email address
I was notified on 05/10/04 that ACC will no longer forward my Email messages to my preferred Email address.  Please do not send Email messages to baldwin@austincc.edu.  Send them instead to Baldwin@DickBaldwin.com

Who Am I?
I receive many email messages addressed to Dr. Baldwin, and I appreciate the courtesy. My highest degree earned is a Masters Degree in Electrical Engineering, and I am a full Professor at ACC. Under the circumstances, Prof. Baldwin is a more appropriate salutation than Dr. Baldwin.

Who are you?

When the semester begins, I will have a large number of students on my rolls.  I probably won't be able to learn your name and email address.

I typically receive hundreds (occasionally thousands) of email messages each day, many of them from my students along with many spam messages.

When you send an email message to me, make absolutely certain that the Subject line contains the following information as a minimum:

Make certain that your reply-to email address is valid.  (Send yourself a message and then reply to it to see if you get the reply.  Do I really need to tell Java programming students how to validate their reply-to email address?  Unfortunately, yes I do.  I receive many email messages from students with invalid reply-to addresses.)

Include your current telephone number somewhere in the body of the message, and make it easy to find.  If my email or your email goes down, I may try to call you on the telephone.

If you don't comply with the above, don't expect me to answer your email messages.

Please Be Patient
Other than questions regarding registration, please do not send email regarding this course prior to the first day of classes.  If you do, I probably won't answer it.  A great deal of preparation is required to teach a course of this nature.  I have many responsibilities to take care of in the final days before the course begins and I do not have the time to work with individual students until after the course actually begins.  If I reach the point that I can accept email regarding this course prior to the first day of classes, I will post that fact on this bulletin board.

Crossing the OOP Chasm
The biggest challenge that most of you will face in successfully completing this course will be in crossing the chasm from procedural programming to object-oriented programming.  (Unfortunately, most of you probably learned what you know about programming from a procedural rather than an object-oriented viewpoint, and bad thinking habits are very hard to break.)

My biggest challenge is figuring out how to help you cross that chasm.  Unfortunately, I don't have a magic recipe for accomplishing this.

If history is any indication of the future, many of you won't make it across.  For this reason, you should plan to devote a very large amount of time and effort to the task of understanding OOP (as opposed to simply memorizing the mechanics of Java programming).

For starters, you should carefully study Lesson 4 in my online tutorials. In addition, I recommend that you follow my recommendations regarding BlueJ, Greenfoot, and Processing.

Beyond that, you should visit one of the major bookstores and read the first couple of chapters in every Java book and every OOP book that you find there (many books have a chapter introducing OOP as a programming paradigm).

There is no simple recipe for learning OOP.  In order to progress from procedural programming to OOP, you will have to develop a completely different way of thinking about programming.  Perhaps if you read what a large number of authors have to say on the topic, that will help you to successfully cross the chasm.

Study Material
A great deal of effort and study is required to successfully make the transition from procedural to object-oriented programming.  Although we will be able to cover some of the relevant material in the classroom, it will not be possible to cover it all.  I strongly recommend that you study the following bodies of material in parallel:

Online video lectures
Online Intro Java Tutorials lessons 4 through 56
Online Data Structures tutorials lessons 1350 through 1380
Sample programs 9000 through 9002 
Essence of OOP Using Java, lessons 1600 through 1630
Advanced Placement Study Guide, AP002 through AP028
Test Your Java Knowledge, lessons 1 through 13.
Additional online resources listed elsewhere on this page.

Puzzled_by Polymorphism
If you, like many students, don't completely understand polymorphism as implemented using inheritance and interfaces in Java, I have written several tutorial lessons that may help you to understand.  You are encouraged to study them to see if they help.

Java1600 The Essence of OOP Using Java, Objects, and Encapsulation
Java1602 The Essence of OOP using Java, Classes
Java1604 The Essence of OOP using Java, Inheritance, Part 1
Java1606 The Essence of OOP using Java, Inheritance, Part 2
Java1608 The Essence of OOP using Java, Polymorphism Based on Overloaded Methods
Java1610 The Essence of OOP using Java, Polymorphism, Type Conversion, Casting, etc.
Java1612 The Essence of OOP using Java, Runtime Polymorphism through Inheritance
Java1614 The Essence of OOP using Java, Polymorphism and the Object Class
Java1616 The Essence of OOP using Java, Polymorphism and Interfaces, Part 1
Java1618 The Essence of OOP using Java, Polymorphism and Interfaces, Part 2
Java1620 The Essence of OOP using Java, Static Members
Java1622 The Essence of OOP using Java,  Array Objects, Part 1
Java1624 The Essence of OOP using Java,  Array Objects, Part 2
Java1626 The Essence of OOP using Java,  Array Objects, Part 3
Java1628 The Essence of OOP using Java,  The this and super keywords
Java1630 The Essence of OOP using Java, Exception Handling
Java904 Use of an abstract class containing no abstract methods

Online OOP Resources
Understanding OOP can be very difficult for those persons who have already developed a lot of non-object-oriented thinking in their previous programming experience.  That's the bad news.

The good news is that there are numerous free online resources to which you can refer in your efforts to understand OOP.  The following is a short list of useful, free online resources (in no particular order).  I strongly recommend that you study all of the material in this list with particular emphasis on the various explanations of Object Oriented Programming.

As time goes on, I will add new items to this list. If you find any of these links to be broken, please let me know.  (Broken links removed on 1/23/07.)

Baldwin's Java Tutorials
The Java Tutorial from Sun, A practical guide for programmers
Sun's Java Developer Connection, Tutorials and Short Courses
Bruce Eckel's Thinking in Java
Object Oriented Concepts in Java - Part 1, by Kevin Yank
Object Oriented Concepts in Java – Part II, by Kevin Yank
Sun's Online Java Documentation
Object-Oriented Programming Concepts from Sun
Object-Oriented Java: Getting Into Interfaces
The jGrasp editor
The BlueJ Java downloadable programming environment
Visual Basic .NET as a Fully Object-Oriented Language
The Java Language Specification 
OO and Java Development:  Guidelines and Resources 
Rock'em, sock'em Robocode, good article on Robocode
Ms.net Framework Training Modules
Code examples from the Java Developers Almanac
JCreator - a color-coded freeware IDE
Search Sun's Java Tutorial at http://java.sun.com/docs/books/tutorial/search.html
Search Sun's documentation and the Java Tutorial at http://java.sun.com/docs/searchabledocs.html 
C# and VB Object-Oriented Programming in Visual Studio .NET
DrJava

Problems in ACC NRG labs
I have been informed that there is a problem when students attempt to execute Java applications out of the root directory in the ACC labs at NRG.  Apparently if you create a directory and compile and execute your programs out of that directory, the problem will go away.  Laboratory personnel are working on the problem.

Classpath Environment Variable
If you are running Java under Windows and are having difficulty executing Java applications that you have successfully compiled, your problem may have to do with the classpath environment variable.  For example, see the discussion at the following URL:

http://java.sun.com/j2se/1.3/install-windows.html#Classpath  

Pay particular attention to the section that reads "Should I modify the CLASSPATH variable?"

Within that section, pay attention to the discussion involving the current directory.

There are also some issues having to do with the classpath for the media library from the Ericson textbook.  Information on how to deal with those issues is provided in the textbook.

Doing online Java research
It is frequently necessary for me to remind students that my teaching and examination approach doesn't involve feeding facts to the students so that they can memorize and regurgitate those facts on the next exam.  Rather, my approach is to teach important Java OOP concepts.  I have an expectation that the student will do the necessary self study and research to fill in the facts in order to successfully complete the next exam.

Here are two online resources that are particularly useful for doing such research:

Search Sun's Java Tutorial at http://java.sun.com/docs/books/tutorial/search.html
Search Sun's documentation and the Java Tutorial at http://java.sun.com/docs/searchabledocs.html

For example, if I needed to know more about focus traversal and couldn't find what I needed in Baldwin's tutorials, I would probably take a look at the sites listed above and search for key words like focus traversal.  This may or may not yield what I need to know, but it surely is a good way to start.

Computer Studies Student Information Form
The following is requested by the Computer Studies department, but is not a requirement of the course in which you are enrolled.  Whether or not you provide the following information will not be taken into account when determining your grade in the course.

If you are willing to provide this information, please compose an e-mail message containing the following information and send it to Baldwin@DickBaldwin.com

If you do provide the information, please make the subject line of your e-mail message read as follows:
Last Name, First Name, Course Number, Student Information Form

DO NOT include this information in the message that you send confirming that you have completed online orientation.  Send separate messages for those two purposes.

You should be able to copy and paste the following form into your e-mail client and then fill in the blanks.  Don't be too concerned about neatness when filling in the form.

Last Name:_____________________
First Name:_____________________
Student ID:_____________________
Course Number: IT__ ____

Telephone Numbers

Home:___________
Work:___________
Other:___________
E-mail address:_________
Any issues that the instructor should be aware of:

_________________________________________________

Reasons for taking the course:

_____Personal Interest
_____Required by degree program, which is ______________
_____Work related - please explain in comments section below
_____Recommended by ______________________________
_____Other, please explain in comments section below
Please indicate the following:
_____Hours working per week
_____Number of credit hours enrolled in this semester
_____Number of computer courses completed at ACC
_____Highest degree earned
What computer courses have you completed at ACC or elsewhere?

_____________________________________________________

What computer or computer related work experience do you have?

_____________________________________________________

Comments:

_____________________________________________________

Broken tutorial links
I discovered during a recent semester that Internet.com had broken the links to many of my Java, Python, and C# tutorials.  The tutorials were apparently still there, but they were at different URLs from the URLs listed in my Table of Contents pages.

If you are unable to view a particular tutorial by clicking the link in the Table of Contents, copy the name of the tutorial from the Table of Contents, and then search for it using Google Advanced Search.  Enter the name of the tutorial in the "Exact Phrase" box, change the number of results per page to 100, and then click the Google Search button.

If you haven't located the tutorial of interest by the time you have viewed the last page of links on the Google results page, click on the link at the bottom of the last Google page that reads "repeat the search with the omitted results included."  Then examine the links again to see if you can find the tutorial of interest.

Please also let me know if you find broken links in my Table of Contents.

A Special Invitation
Statistics show that the dropout and failure rate in Distance Learning classes is much higher than in classes where students regularly attend lectures, ask questions, and participate in discussions.  It is my strong desire that you succeed in this course and that you do not drop out.

If you are enrolled in the Distance Learning section of the course, I urge and invite you to attend my lectures whenever your schedule will allow.

You can find the schedule for all of my classes at the following URL:

http://www.austincc.edu/

Discussion during office hours
Whether you are a regular classroom student or a Distance Learning student, if you don't understand everything that you need to understand about OOP using Java, you need to be in my office talking to me about it.  Often a short explanation will get you past a roadblock and get you back on the track to learning OOP.  Visit during office hours, lab periods, or any time that my office door is open.

The Importance of Sun's Java Documentation
I cannot overemphasize the importance of learning how to use Sun's Java documentation for aspiring Java programmers.  I have published a lesson entitled The Importance of Sun's Java Documentation, which you would do well to study.

Warnings in JDK version 1.5 and later
As a result of changes (improvements?) made in JDK1.5, (see my lesson entitled Generics in J2SE 5.0) many existing programs will produce the following warning when recompiled using JDK 1.5 or later versions:

Note: ....java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

This is a warning, and is not an error.  As far as I am concerned, you can simply ignore the warning.

The lesson entitled Generics in J2SE 5.0 explains how to avoid the warning on future programs.  It is extremely unlikely that I will modify and re-publish earlier programs that worked fine prior to the changes in the JDK.

Do not send executable attachments
If you send an email message to me and expect me to read it, DO NOT attach any executable files, even if they are encapsulated in a zip file.  This includes files with the following extensions, just to name a few:

.exe
.com
.scr
.bat
.pif
.vb

If you do send such files, my virus blocker will simply reject the message and I will never see it.

The following file extensions should be OK:

.java
.class
.htm
.html
.css
.xml
.xsl
.doc
.zip (Provided the zip file doesn't contain any executable files.)

If you find it necessary to send a questionable file for any reason, you should also send another message without an attachment notifying me that you sent the questionable file as an attachment so that I can be on the lookout for it.

Problems with the Java version and the path environment variable
A student of mine who had successfully compiled and executed Java programs on his system suddenly began to experience problems when trying to execute programs that had compiled successfully and had been run successfully in the past.

After a great deal of troubleshooting effort, this student determined that the recent installation of Oracle software for a database course that he was taking had caused an old version of the Java virtual machine to be installed on his system.  In addition, that installation had placed an element at the beginning of his path environment variable that caused the old version to be executed every time he attempted to execute a Java program.

If you experience problems when executing compiled Java programs from the command line, try entering the following command and confirming that you get a similar response (the first few digits of the version shown should be the same as the version that you installed):

C:\jnk\1>java -version
java version "1.6.0_06"
Java(TM) 2 Runtime Environment, Standard Edition 
(build 1.6.0_06-b05)
Java HotSpot(TM) Client VM (build 1.6.0_06-b05, mixed mode)

Similarly, if you experience problems when compiling Java programs, try entering the following command.  Your output should confirm the version.

C:\jnk>javac -version
javac 1.6.0

Grades
I have been notified that I am no longer allowed to send your grades to you via email.  Therefore, in order to view your grades on exams, you must establish a Blackboard account.  Since I have never established a student Blackboard account, I can't tell you what is involved.  All I can tell you is that you can probably begin that process at the following link:

http://acconline.austincc.edu/

Once you are connected, you should be able to view your grades in the grade book.  Once again, never having gone through that process as a student, I can't tell you what is involved.

Please be aware that only the individual grades showing in the grade book are of significance, and they are provided for information purposes only.  The computations that purport to show your final grade are meaningless.  I will compute and record your final grade (possibly including a curve) according to the information contained in the syllabus and other related documents, and will cause that grade to be recorded at the end of the semester completely independent of the Blackboard grade book.

Also be aware that if you find any information in Blackboard that conflicts with information provided in the syllabus and its associated documents, the information in the syllabus and its associated documents will prevail.  If you find such conflicts, please notify me.

If you are unable to set up your account and view your individual grades via Blackboard, please let me know.

Your official Email address
It is my understanding that beginning in the Fall of 2008, all ACC students have been provided an official Email address by ACC, and that address is reflected in all official ACC student records.  I have been told that you can cause messages sent to that address to be forwarded to the Email address of your choice.  You should make it point to either forward those messages, or to check your ACC email address on a daily basis.

Please be aware that when I need to send a broadcast message to all students in the course, I will send that message to your official ACC Email address. If you don't check you mail at that address, you won't get the message.

DrJava and Ericson's media library
You may want to use a free Java IDE named DrJava, which is the IDE recommended by the textbook for this course. It has some very interesting features including the ability to execute Java code interactively.  It can also be run without the requirement for a Windows installation and should run on any platform that has a Java JRE installed.  For example, I am currently running it from a USB memory stick.  If you download it, I recommend that you download the JAR file and run it as a Java application instead of downloading the Windows executable version.  (I was unable to successfully run the Windows executable version under Windows Vista Home Premium Edition.)

See RunningDrJavaAtACC  for instructions for running DrJava in conjunction with Ericson's media library in the ACC NRG labs.

The materials in the media library were provided by Barbara Ericson for use with the textbook.  Georgia Institute of Technology holds a copyright on the media library.

Published tutorials and programs using Ericson's multimedia library
I have published a number of tutorials and sample programs using Ericson's media library.  See the tutorials beginning with #340 at http://www.dickbaldwin.com/tocadv.htm

Windows Vista and Windows 7 versus Windows XP appearance
Although ACC computer labs are still running WinXP, many of you (and myself included) who have purchased new computers are probably running some version of Windows Vista or Windows 7 at home.  The exam documents contain images showing the output images required by many of the programs.  With Vista and Windows 7, you have several appearance options including Windows Aero, Windows Vista Basic, Windows Standard, and Windows Classic.  The option that seems to provide the best match for the images in the exam documents is Windows Standard.  You can change the "Window Color and Appearance" in Vista by right-clicking the desktop.

Online video lectures
The classroom lectures have been published as online video lectures primarily for the benefit of Distance Learning students, but freely available to all. You should consider those videos as a major study resource.


Links

If things don't seem to be working properly when you follow these links, you may need to clear your cache or force a reload or both.

Bulletin Board

Check this area daily for messages from Professor Baldwin to all students enrolled in the class. Newer messages are posted at the end.

05/07/11 Exams are ready for downloading
All three exams are ready for downloading after you complete the orientation.


05/07/11 Corrupted image displays
Since I installed java version "1.6.0_21" on my home computer, some images contained in Frame and JFrame objects seem to corrupt themselves after a few seconds as shown below. (Subsequent Java updates have not corrected the problem.) The image on the left shows how the image looked when it first appeared on the screen. The image on the right shows how the image looked a few seconds later.

Forcing the image to be repainted will usually cause it to be correct for a few seconds, after which it usually reverts to the corrupted state.

This problem did not occur with java version "1.6.0_14", which I was using until I upgraded to version "1.6.0_21".

I am using Windows Vista Home Premium Edition.

As of this writing, I have no explanation for the cause of the problem. It may be a problem with the graphics hardware in my computer. If anyone else is seeing this problem, I would like to know about it.

Missing image




-end-

File: ITSE2321.htm