Thursday, September 29, 2011

Quiz #3 - results

This week's quiz results were significantly improved over the previous two weeks. The class average this week was 70.0% and four students earned full credit. Be sure to review truth tables, if decisions, and switch statements for next week's quiz.

Grade distribution follows:

Wednesday, September 28, 2011

Building a tidy string

When we use the console for our output, we can carefully format the output using the System.out.printf method. We can format the strings for a JOptionPane dialog box, too, but there are a few extra steps involved. This example shows one way to build a formatted string using a Formatter from the java.util package.

Reading assignment - chapter 4

Read chapter 4, Loops.

Due Date
Tuesday, October 4th, 7:00pm

Tuesday, September 27, 2011

Lab 3 - DaysInMonth.java

You are to complete exercise 3.11
(6th ed, p94; 7th ed, p100; 8th ed, p108).

The class name must be DaysInMonth and it must be written as a GUI application.

Homework 4 - QuadraticEquation.java

You are to complete exercise 3.1, p 106

The class name must be QuadraticEquation and it must be written as a console application. You must use the Math.sqrt method, not the Math.pow method.

Monday, September 26, 2011

Just say no to "magic numbers"

It is unacceptable to use "magic numbers" in your source code. When dealing with trivial programs, using a naked number doesn't look like such a big deal (the code is short and, if well commented, the intent of the programmer is clear) but it is still a very bad habit to develop. The problem is both clearer to see and greatly magnified once the size of the code in question is larger.

Friday, September 23, 2011

Reading assignment - chapter 3

Read chapter 3, Selections.

Due Date
Tuesday, September 27th, 7:00pm

Tuesday, September 20, 2011

Academic honesty

In reviewing source code this weekend, I have noticed that some students are still emailing me source code files that are suspiciously similar to the work sent by another student. I realize that the first few assignments should be rather similar in appearance due to the very trivial nature of the requirements given but the students involved have submitted similar initial code and similar revisions - including their errors.

Homework 3 - TakeOff.java

You are to complete exercise 2.24, p 69

The class name must be TakeOff and it must be written as a GUI application.

Lab 2 - NextMonthsInterstConsole.java
NextMonthsInterestGUI.java

You are to complete exercise 2.13 (6th ed, p65) /
2.12 (7th ed, p64; 8th ed, p65).

This assignments requires you to submit two source code files, one using the command line for input and output, the other using dialog boxes.

Friday, September 16, 2011

Email reminder!

I continue to find emails arriving in my Brookdale inbox which do not originate from the Brookdale mail server. As I announced in the first class, all email which does not come from a Brookdale email address is deleted unread. If you need to contact me, you must use your Brookdale email only.

Thursday, September 15, 2011

Gack!

Due to a catastrophic system failure, I need to reinstall all of my software. I will review and grade all assignments submitted but please be patient as I reconfigure my home system.

Tuesday, September 13, 2011

Reading assignment - chapter 2

Read chapter 2, Elementary Programming.

Due Date
Tuesday, September 20th, 7:00pm

Homework 2 - CylinderVolume.java

You are to complete exercise 2.2, p 63

The class name must be CylinderVolume and it must be written as console application.

Monday, September 12, 2011

Homework 1 - recap

Please read the following notes on the first homework assignment, which was due this morning at 8:00am.

Sunday, September 11, 2011

Public service announcement #2

Notice to all students:

Though it does not affect our Comp171 class, Brookdale is NOT closed on Columbus Day. If you have Monday classes this semester, you have school on Monday, October 10th.

Saturday, September 10, 2011

Reading assignment - chapter 1

Read chapter 1, Introduction to Computers, Programs, and Java.

Due Date
Tuesday, September 20th, 7:00pm

Friday, September 9, 2011

Syllabus

The syllabus for this class is available on the Computer Science Department's page on the Brookdale website. View or download the syllabus here.

Tuesday, September 6, 2011

Lab 1 - TipCalculator.java

You are to complete exercise 2.5
(6th ed, p63; 7th ed, p63; 8th ed, p64).

The class name must be TipCalculator but you may write either as console application or as a GUI application.

Homework 1 - HelloWorld.java

You are to complete exercise 1.1, p 21.

The class name must be HelloWorld and it must be written as console application.

Requesting user input from dialog boxes

Java is not limited to the command line for obtaining data from the user. This example shows how to create pop up dialog boxes to request and user input.

Requesting user input from the command line

Most programs need to request information from the user. This example shows how to request and accept information from the user at the command line.

Java in Eclipse

You can run your Java code in the Integrated Development Environment (IDE) Eclipse.

Java in Edit Plus

Edit Plus is another text editor you can use to edit and to compile and interpret your Java code. The installation file for the version 2 software is located on the Brookdale M drive. See one of the learning assistants in LAH 103 if you have difficulty locating the file.

Java in Notepad++

Notepad++ is another (free!) text editor you can use to edit and to compile and interpret your Java code.

Java in TextPad

You can write and edit Java source code using a simple text editor such as TextPad. This is the editor I personally prefer to use.

javac and java at the command line

After you have created a Java source code file, you will want to compile and run your code. Using a simple HelloWorld class, here is how it is done at the command line.

The code will look like this:

Monday, September 5, 2011

Public service announcement #1

Swimming River Road is closed indefinitely due to damage sustained during Hurricane Irene. Please plan your route to school accordingly and allow extra travel time as other approached to the Lincroft campus will likely be more congested than normal.

Sunday, September 4, 2011

Required textbook

The required textbook for this course is Introduction to Java Programming by Y. Daniel Liang.

You can buy a copy at the Brookdale bookstore ($129.00) or try one of the Internet retailers such as Amazon.com or Barnes and Noble.

Basic DOS commands

Here are some basic DOS commands which should be helpful to you when you are working (compiling and running code) at the command line.

Saturday, September 3, 2011

Deliverables

All programming assignments must be submitted by emailing the Java source code file(s) to Professor Mayo at cmayo@brookdalecc.edu.

You will be submitting source code files, not class files. Source code files must be attachments, not pasted into the body of the email. Java source code files must have the .java extension, not .txt or any other extension.

Friday, September 2, 2011

Grades

Final grades for this class will be determined according to the following criteria:
  • Test average
  • Lab assignments
  • Homework

Installing Java

Java is installed on the computers in most if not all of the Brookdale computer labs. If you want to be able to work at home, however, you will need to install the Java Development Kit or JDK.

Thursday, September 1, 2011

Java API documentation

The Java API documentation is located on the Oracle web site. The documentation is arranged using an easy to navigate tree structure by package and by individual class name.

Jump there now

Deadlines

Missing deadlines and snow days...

Missed Exams
Departmental policy states that a student may make up one missed exam. It is not the instructor's responsibility to track down students who have missed tests; it is your responsibility to see your instructor to arrange a make up.