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

  Implement elliptic curve encryption - decryption in java

Implement Elliptic Curve encryption - decryption in java. Specifically, your program will read parameters, plaintext and ciphertextfrom a file

  Returns the object with the largest measure

public static Measurable maximum(Measurable[] objects)that returns the object with the largest measure. Use that method to determine the country with the largest area from an array of

  Create java applet to input miles driven and gallons used

Create the Java applet which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Write a program to that finds lowest n closing dow jones

You are to write a program to that finds lowest N closing Dow Jones Industrial averages and their dates in order by closing average. The program should prompt for the number of lowest closing averages requested by the user to be output.

  Wa program that takes 10 values represent

Using a loop, write a program that takes 10 values represent in exam grades (between 0 and 100) from the keyboard and outputs the minimum value, maximum value, and average value of all the values entered.

  Generate the pseudocode for each of the classes.

Generate an object-oriented design for a system that keeps tracks of your CD and DVD collection.

  Java program which defines an unconstrained array

Write a Java program which defines an unconstrained array of user defined length n, that contains n Random numbers and outputs those random numbers that are even numbers

  Reads in up to 1000 non-negative integers

Write a program that reads in up to 1000 non-negative integers and displays distinct numbers (i.e., if a number appears multiple times, it is displayed only once). (Hint: Read each number and store it in an array if it is new. If the number is alread..

  Negatively impacting health care currently

Identify and explain at least two events that are negatively impacting health care currently. Tell us why you think these items are negatively impacting the access to care, and make sure that you cite your references.

  Write a general package for reading in arithmetic expression

Write a general package for reading in arithmetic expressions and simplifying them. Write a program for a simple calculating language with two forms of statement.

  The calculations were provided to you by a real estate agent

Your applet needs to extend the Applet (or JApplet) class. Of course, you need to import the appropriate applet package(s).

  Program which evaluates a weighted average

Write a program which reads student names, social security numbers, and test scores from an input file named infile.

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