Wednesday, January 28, 2009

Graded the first major assignment

There were some awesome Bank Account programs. Very nice. The average grade for everyone was 89.7. I left a txt file on your FTP space with some comments and a grade.

I changed the test to next Monday on the syllabus. I will have a review sheet online today as well.

See you in class!

Monday, January 26, 2009

Chapter 4


Chapter 5


Chapter 6


Chapter 7

Thursday, January 22, 2009

Here's a sample main method to test your Bank Account:

public static void main(String[] args)
{
BankAccount account1 = new BankAccount();
account1.deposit(100);
System.out.println(account1.getTransactionCount());
System.out.println("Expected: 1");
BankAccount account2 = new BankAccount(1000);
account2.withdraw(100);
System.out.println(account2.getTransactionCount());
System.out.println("Expected: 1");
BankAccount account3 = new BankAccount();
account3.deposit(1000);
account3.withdraw(100);
account3.deposit(1000);
account3.withdraw(100);
account3.withdraw(100);
System.out.println(account3.getTransactionCount());
System.out.println("Expected: 5");
}

Wednesday, January 21, 2009

Study session

I'm very excited about the beginning of the term. I will be in the computer lab

(Study Center in Room 9103)

tomorrow at 4:30 pm and Friday at 3:30 pm to help you with your code for your first two projects.

If you are interested in coming either day, email me so I can have an idea of how many students will be there. If it's too many, perhaps we can stagger the times.

FTP Login

Use your first name with a capital letter:

Example:

John

Password:
MDC ID

DavidB is the only student who needs to use their last initial. I have the David account. :)

Fernando Rivero will login as FernandoR

Monday, January 19, 2009

Major Assignments Summer 2009

Here's your first assignment.

Here's your second assignment (due June 16th, 2009).

Here's your third assignment.

Here's your fourth assignment. (Due July 7th, 2009).

Wednesday, January 14, 2009

NumberGuesser

Ask the user for a number. If the user's number is yours (you picked it earlier!) thank the user for playing. Otherwise tell the user if the number they guessed is higher or lower than the number you have picked!

Create a Java program to give you acceptable age ranges

Take your age divide by two and add seven...this is the upper and lower bound of the ages you can date.

http://www.xkcd.com/314/

Here's one solution:

int myAge = 20;
double acceptableRange = (myAge/2)+7;
// System.out.println(acceptableRange);
double difference = myAge - acceptableRange;
// System.out.println(difference + " is the difference");
System.out.println("You are " + myAge + " years old");
System.out.println("The oldest you can date is "+ (myAge + difference));
System.out.println("The youngest you can date is " + acceptableRange);

Lemonade Stand!

What classes will you need for a Java program representing a Lemonade Stand?

What attributes will each class need?

What methods will each class need?

Please write it on your blog as follows:

Class A
Attributes

Methods

Class B
Attributes

Methods

So on...

Monday, January 12, 2009

Once you get everything installed...

Try to create a program that will calculate the area of a rectangle given the length and width. Not for a grade, just to try it.

First post!!!

  1. Describe the difference between a class and object in Java.
  2. What is a method?
  3. What is a variable?


When you are finished, add your information here:

Wednesday, January 7, 2009

Welcome to class!

Notice the links to the right of this post. There will find the syllabus, class notes, a great review about classes and objects, an installation guide, a reference guide and many other great links.

Also check out previous posts from other semesters. It may help you get an idea for what we'll do in this class. Of course, each class is different.

I am very excited about this course.

Things to do:
  • Install Netbeans and Java ASAP.
  • Get the book and read the first two chapters.