Change the cpp program in java

Assignment Help JAVA Programming
Reference no: EM13968912

class Room

{

private:

double L;

double W;

public:

//functions go here.

}

class House

{

private:

Room room1;

Room room2;

public:

//functions go here

}

The code above is C++ version. In java, you must make the variables private. Dont forget to use the "new" command. Basic Example: House h = new House();

*Make sure each class is in its own file with the correct functions and data types*

The program will basically ask the user to input a L and W for a room, then ask for L and W for the other room. It will then calculate which of the two rooms is bigger. It should assign the bigger room to the parents and smaller room to children. State: "parents get room #_ of size __", "children get room #_ of size __".

Make sure to actually use the class objects for this program

Reference no: EM13968912

Questions Cloud

What some specific ways in which zappos employees empowered : Zappos has made it a priority to empower its employees and enable them to make more decisions. What are some specific ways in which Zappos employees are empowered?
What should susan do to investigate other green market : What should Susan do to investigate other green market opportunities for the hotel? Who do you think Susan should involve in the group of staff to pursue the green program? Why?
Discuss why other structures are not appropriate : Explain why the new mission statement and vision statement are appropriate for Cyber Software, Inc.; Discuss other aspects of the planning phase that impacts Cyber Software, Inc.;
Write an e-mail or a meeting request : You have recently been named the new vice president for operations of Wisconsin Frozen Delights, a regional ice cream manufacturing firm located just outside a large metropolitan area in Wisconsin. Establish the agenda for the meeting. Write an e-m..
Change the cpp program in java : The code above is C++ version. In java, you must make the variables private. Dont forget to use the "new" command. Basic Example: House h = new House();
Determining the probability of winning : It is assumed that the game terminates the ?rst time the player wins or loses. What is the probability of winning?
Develop a java application to calculate the monthly paycheck : Develop a Java application to calculate the monthly paychecks for a number of different types of employees. The employee types are created in a subclass array based on parent base class Employee. Does this ring a bell?
Compare circuit and packet-switched networks. : Provide examples of what currently available systems can be enhanced and where additional opportunities exist.
How a lot of employees cheat a little at work : How a Lot of Employees Cheat a Little at Work. Take your inspiration from Dan Ariely's Ted Talk, "Our Buggy Moral Code" and concepts from Chapters 1-4 to create a Slideshare about unethical workplace behavior. You may focus on one or several uneth..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd