1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helen [10]
3 years ago
12

I am confused in Java!

Computers and Technology
1 answer:
GarryVolchara [31]3 years ago
3 0
Import java.util.Random;

class Building
{
    private int w, h;
    private int numberOfWins;

    public Building(int width, int height)
    {
        w = width;
        h = height;

        // generating random windows. can be between 1 and 10
        Random rand = new Random();
        numberOfWins = rand.nextInt(9) + 1;
    }

    public int getWidth() { return w; }
    public int getHeight() { return h; }
    public int numberOfWindows() { return numberOfWins; }

    public String toString()
    {
         return "a black building, width: " + width + ", height: " + height +
                    ", has " + numberOfWins + " windows"; 
    }
}

----------------------------------------------------

then you can create some Building objects and output them!
You might be interested in
You work for ScreensRUs, a business that sends repair people to sites to fix damaged car windshields. Your employer provides com
Ede4ka [16]

Answer:

tldr; treat this like a brief essay. some reasons would be "having a smartphone makes your job easier", "smartphones can make the job easier to do on the go".

Explanation:

hi there!

ok, so this should be pretty simple.  first, we should take a look at the issue in the scenario;  you're an employee for a company that relies heavily on technology to get your job done and send other employees to their customer's locations.  because of this, getting poor quality mobile phones would make your job a little bit harder to do.

to put this in a little bit of a better perspective, imagine that you're an employee in a store, and your job is to sweep the floor. however, your boss only gives you a dust pan and bad quality broom.  that'd make you wish that you had some better equipment to get your job done faster, right?

a memo is basically a written message in a business place; in modern days, they're usually emails, but back in the day they were letters and such.  for this assignment, treat this like an essay! however, be sure to be to-the-point.

now to answer the question; we've already covered one reason that you could use in the memo: "having a smartphone would make your job easier". now think about what else having a smartphone would do compared to a mobile company phone.  

here's an example of a memo!

good luck! hope this helped.

5 0
3 years ago
Colby has a presentation with steps demonstrating how to make his famous cheesecake. He would like to post this on his new websi
lesantik [10]
I think a video to post to your website would be very good 
3 0
4 years ago
Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
vaieri [72.5K]
The correct answer would be details.

8 0
3 years ago
why is it when i go to social it shows a post from February it's like i am not with the ppl posting rn
Fittoniya [83]
Not sure. if youre online try messing with the filters if there are some, if youre on the app try updating it.
3 0
3 years ago
Select the correct answer. Arcade games such as Donkey Kong, Mr. Do! , and Venture were adapted from arcade titles to home conso
Andrew [12]

Answer:

D. Magnavox

hgjvyihbnjbuhklnk. hvgvjnm;lkbhkvkbl.

4 0
4 years ago
Other questions:
  • Which of the following Internet business models involves a merchant creating an online digital environment that enables people w
    11·1 answer
  • As a graphic designer, you'll refer to a line as which of the following? A. Point B. Border C. Rule D. Frame
    9·2 answers
  • List and describe four communication tools that are currently popular.
    9·1 answer
  • Compare and contrast an example of an actual company that has a brick and mortar location with an actual company that does not h
    8·1 answer
  • Which of the following is categorized as an indirect payment
    9·1 answer
  • Which of the following is time-dependant? Group of answer choices
    8·1 answer
  • A(n) ____________________ is a named collection of stored data, instructions, or information and can contain text, images, video
    5·2 answers
  • Write a program to generate the 1,8,27,64,125,226,343,512,729,1000 series.​
    12·1 answer
  • How does the issue of cybersecurity relate to the internet of things?.
    5·1 answer
  • Explain two protocols to enhance cellular networks capacity?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!