However i based my program off a different uml diagram.
Java carpet program.
The java lang math floor double a returns the largest closest to positive infinity double value that is less than or equal to the argument and is equal to a mathematical integer.
Copy constructor public room carpet room carpet rc this rd rc rd.
Java convention puts the open brace at the end of line not the start of next line.
Carpet calculator the westfield carpet company has asked you to write an application that calculates the price of carpeting for rectangular rooms.
In order to plant a carpet correctly make sure to anchor it into a flat non floating object.
Get input from keyboard in java.
Get the length of the room.
Java floor method the method floor gives the largest integer that is less than or equal to the argument.
The most common form of java moss is what is referred to as a carpet.
Produce a graphical or ascii art representation of a sierpinski carpet of order n.
2 classes and 1 test program which i have created.
Start of next line is a c c and other convention.
Carpet calculator program posted by justin musgrove on 08 october 2014.
Many people pin the carpet down to the substrate using a mesh net and others simply sprinkle a light layer of substrate into the moss and let it grow right through.
My code for the program runs and works fine.
If the argument value is already equal to a mathematical integer then the result is the same as the argument.
To calculate the price you multiply the area of the floor width times length by the price per square foot of carpet.
System out println this program will display the carpet cost of a room nplease enter the room s dimension in feet.
I had to go back and add more modules based on the uml diagram that my professor gave the class.
The use of the character is not rigidly required for ascii art.
Should instead be.
For example the area of the floor that is 12 feet long and 10 feet wide is 120.
If the argument is nan or an infinity or positive zero or negative zero.