SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Dec 2017 My Price 10.00

Count the number of times a letter that is not a grade

Hi, can someone please help me with these two programs please?! I have to do these two programs and I just want to compare with my programs so I can fix them. Thank you and sorry for any inconvenience.

  • CS 151 Programming Assignment # 11 — Room Class Design a Java class that represents a room of a house. Assume that a room is a rectangular box without doors or windows, so that it is described with three doubles: the width, depth, and height of the room. A room has a carpeted floor and painted walls and ceiling. Room objects have instance variables that hold the carpet color and the color of the walls and ceiling. The ceiling and walls are the same color, but the carpet has its own color. Make all instance variables private. The constructor sets the width, depth, and height of the room. These values never change, so there are no setters for them. The constructor should also initialize all colors to “white”. Room objects have methods that change the colors and retrieve the colors: public void setCarpetColor( String color ) public String getCarpetColor() public void setWallColor( String color ) public String getWallColor() The instance variables for the colors hold String references (don’t use Java class Color, which is useful for graphics but not needed here). Also, implement the following methods: public double getTotalArea() // the total area of the room public double getWallArea() // the area of just the walls and ceiling public double getFloorArea() // the area of the floor. public String toString() // a String that describes the room Now write a method that computes the gallons of paint needed for the room given the coverage of the paint in square feet covered per gallon of paint: public double calcGallons(double squareFeetPerGallon) If you use BlueJ you can test your class by instantiating an object and running its methods from the BlueJ interface. If you want to use the command line, write a separate testing class that consists only of a main() method. The main() method tests the class by doing something like this: public static void main ( String[] args ) { Room rm; rm = new Room( 10.2, 16.1, 12.0 ); // create a new room System.out.println( rm.toString() ); // display its variables rm.setWallColor( “green”); rm.setCarpetColor( “brown” ); System.out.println( rm.toString() ); System.out.println(“Total area: “ + rm.totalArea() ); System.out.println(“Wall and ceiling area: “ + rm.wallArea() ); System.out.println(“Floor area: “ + rm.floorArea() ); System.out.println(“Paint needed: “ + rm.calcGallons( 120 ) ); } Of course, you will do more debugging than this. Add or remove lines of code from your main() method depending on what aspects you wish to test. Turn In: Your source file for the Room class, Room.java

Attachments:

Answers

(5)
Status NEW Posted 12 Dec 2017 10:12 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)