Computer Science with Mr. H

Tuesday, March 9, 2010

Computer Science 2 - New Unit

Grab the following files:

- Unit 3 - Conditionals and Loops Schedule 2010
- 3_8_5_1_5_2_slides.ppt
- chap05ex.zip (The program examples from the slides)
- Conditionals mini-lab

Tomorrow I will be out of class, so it will be a work day.

Friday, March 5, 2010

Computer Science 2 Review Activity

See the following link:

http://www.quia.com/quiz/1498499.html

Make sure you put in your name when prompted. Good luck!

Thursday, January 28, 2010

Computer Science Classes - Friday 1/29

Sorry I'm out today guys...I've been feeling lousy all week, and I really need to rest up.

Computer Science 2 guys
Continue to work on the book problems and the lab assignment. The book assignment must be completed and emailed to me by 3:30 today...the lab is of course due next Tuesday.

AP Guys - I think it's time you practiced making parent and child classes...

You are to create a new project called "MyOwnAutoShopProject" as following:

* Create a super class called Car. The Car class has the following fields and methods.
o int speed;
o double regularPrice;
o String color;
o double getSalePrice();
* Create a subclass of Car class and name it as Truck. The Truck class has the following fields and methods.
o int weight;
o double getSalePrice(); // If weight > 2000, 10% discount. Otherwise, 20% discount.
* Create a subclass of Car class and name it as Ford. The Ford class has the following fields and methods
o int year;
o int manufacturerDiscount;
o double getSalePrice(); // From the sale price computed from Car class, subtract the manufacturerDiscount.
* Create a subclass of Car class and name it as Sedan. The Sedan class has the following fields and methods.
o int length;
o double getSalePrice(); // If length > 20 feet, 5% discount, Otherwise, 10% discount.
* Create MyOwnAutoShop class which contains the main() method. Perform the following within the main() method.
o Create an instance of Sedan class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the super class.
o Create two instances of the Ford class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the super class.
o Create an instance of Car class and and initialize all the fields with appropriate values.
* Display the sale prices of all instances created. You may use toString() methods to do this, or use the main, whatever you think is best.

This will be due at the end of class Monday, 2/1.

Tuesday, January 26, 2010

Welcome new Computer Science students!

The slides for today are in the "Computer Science 2" section on the sidebars to the right. Search for "Ch 1 slides" to find them.

Monday, November 30, 2009

New Unit: Arrays

Make sure you grab the following for today:

ArrayExamplePrograms.zip
Intro_to_Arrays_6.0_6.1.ppt

Friday, October 30, 2009

Stuff for today

Get the Chapter 4/Unit 3 Schedule, and Writing Classes Assignment #1 for today.

Also, get the Die and RollDice classes from Wednesday.

Thursday, October 15, 2009

Big due dates coming up

The lab packets were handed out today. The set of programs for this packet is due Friday, October 23rd at 3:30pm.

Also, I am assigning some more of the review problems from the text. They are:

p 181 - Multiple Choice - (3.4-3.8)
p 184 - True/False - (3.7)
p 185-187 - Short Answer - (3.7-3.15, 3.19, 3.20)

These are due at 3:30 on Tuesday, October 20th.