![quennnshyan7276](/avatars/2824.jpg)
quennnshyan7276
26.03.2021 •
Computers and Technology
In the garden, the ratio of roses to daisies is 2:5. There are 40 roses. How many daisies are there?
help me plz
thx if you do
Solved
Show answers
More tips
- A Art and Culture Attention, the Final Episode of Margo is Almost Here!...
- W Work and Career How to Start Your Own Business: Tips and Recommendations...
- S Society and Politics 10 Tips for Boosting Your Self-Esteem...
- C Computers and Internet How to Create a Folder on Your iPhone?...
- G Goods and services How to sew a ribbon: Tips for beginners...
- F Food and Cooking How to Make Mayonnaise at Home? Secrets of Homemade Mayonnaise...
- C Computers and Internet Which Phone is Best for Internet Surfing?...
- F Food and Cooking Everything You Need to Know About Pasta...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
Answers on questions: Computers and Technology
- C Computers and Technology State the steps for opening Ms word Application ...
- C Computers and Technology Which of the following is not an advantage to a data-driven website? multiple choice a. increasing update costs b. more efficient c. minimizing human error d. development...
- C Chemistry Iron (fe), carbon (c), and silver (ag) are all examples of substances that cannot be changed to simpler substances by ordinary means. such substances are known as...
- G Geography This diagram shows rock formations forming.which statements describe formations 1 and 2? check all that apply.formation 2 is an intrusion.formation 1 is an extrusion.formations...
- B Biology What has constantly changing amount of salt in the water...
- S Social Studies All of the following are goals the federal government seeks to achieve in the economic realm except a. full employment. b. price stability. c. income equity. d. economic...
- M Mathematics The awp for a gallon (3785 ml of tussin dm cough syrup is $18.75, with an additional 20% discount from the wholesaler. what is the cost of 16 oz of the medication?...
- M Mathematics Denny chose two cards randomly from a deck. what is the probability of getting a queen and a jack without replacement?...
- H History Why did the american colonists favor a representative government separate from england...
- M Mathematics Ahmed doubled his savings, then deposited another hundred dollars. let s represent the amount he originally had in savings. which shows an expression to represent his current...
Ответ:
Window.java
public class Window { int width; int height; public Window(int width, int height){ this.width = width; this.height = height; } public int getWidth(){ return width; } public int getHeight(){ return height; } public int getClientAreaHeight(){ return getHeight(); } }Main.java
public class Main { public static void main (String [] args) { Window win1 = new Window(12, 15); System.out.println(win1.getClientAreaHeight()); } }Explanation:
Window.java
There is a Window class with two int type attributes, width and height (Line 1 - 3).
The constructor of this class will take two inputs, width and height and set these input to its attributes (Line 5 - 8). There are two methods getWidth and getHeight which will return the value of attributes width and height, respectively (Line 10 - 16).
The required new method getClientAreaHeight is defined in line 18 -20. This method will call the getHeight method to return the height value of the window (Line 19).
Main.java
We test the Window class by creating one Window instance and call the getClientAreaHeight method and print the return output (Line 1 -6).
We shall see 15 is printed.