Class with Dimensions

Carpet shop program

Page 1 of 1

1 Replies - 1481 Views - Last Post: 05 November 2006 - 08:44 PM Rate Topic: -----

#1 hbushong  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 04-November 06

Class with Dimensions

Posted 04 November 2006 - 12:22 PM

Working on a program for the carpet guy next door.

Looking for something very simple and basic so I can make changes later
as I learn how to do Java programming.

I need to create a class named RoomDimension that has two fields,
one for length and one for width.
The RoomDimension needs to have a method that returns the area of the
room in square feet.

Next, I will need a RoomCarpet class that has a RoomDimension object as a variable.
I will also need a field for the cost of the carpet per square yard.

Then I would like to use these two classes to create an application "CarpetCalculator"
that asks the customer to enter the dimensions of the room in feet and the price per square yard of the carpet selected. I need the application to display all the information
provided with the total cost of the carpet to be installed.

For ease of use, I want to use the JOptionPane class to get the information and to display the values. Also need to use the decimal format object to display numerical values.

Would like a UML for both classes using wordpad.

Any help would be appreciated. Need to have this ready for testing Sun. 11/05/06 evening, and debugged by Mon. AM for work.


Is This A Good Question/Topic? 0
  • +

Replies To: Class with Dimensions

#2 MarkoDaGeek  Icon User is offline

  • Dirty Technophile
  • member icon

Reputation: 14
  • View blog
  • Posts: 11,158
  • Joined: 13-October 01

Re: Class with Dimensions

Posted 05 November 2006 - 08:44 PM

I don't know if your going to make your deadline, If you would have posted this in the Java forum you would have likely gotten some help by now.

Let me move it there for ya.

Welcome to Dream in Code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1