Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

int totalSquareFeet() Calculates the total square feet by summing the individual square footage from each Room in the Array rooms. double averageSquareFootagePerRoom() Calculates the average

image text in transcribed

  1. int totalSquareFeet()

    1. Calculates the total square feet by summing the individual square footage from each Room in the Array rooms.
  2. double averageSquareFootagePerRoom()

    1. Calculates the average square feet per room by averaging the individual square footage from each Room in the Array rooms.
  3. String[] roomNames()

    1. Returns a String Array of Room names sorted in Lexicographic order

Here is the Room Class below :

image text in transcribed

Can someone help me with this?

import java.ut public class Houset ava private RoomI] rooms; // Constructor Do Not Modify public House (Room[] rooms) his.room8room3 *Calculates the sum of the squareFeet of all the rooms in rooms * @return suum public int totalSquaret) return 0; *Calculates the average square footage per room based on the * footage of each room and the total number of rooms * Creturn average ratio of square public double aveageSquaeEetgexReom() i return 0 *Returns a SORTED list of room names in lexicographic order * Creturn sorted String Array public stringl xeomNames return null; public class Room private String name; private int length, width; public Room [ this.name"undefined"; this.length -1; this.width -1; public Room (String name, int length, int width) this.name name.toLowerCase ); this.length length; this.width width; public int getLength) return this.length; public int getWidth () return this.width; public String getName ) return this.name; public int getsquareFeet return this.length * this.width

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

use toluene to get N, N diethyl aniline

Answered: 1 week ago