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
Use computer magazines and/or the internet to investigate one of these DBMSs: DB2, SQL Server, MySQL, Oracle, or Sybase. Prepare
tigry1 [53]

Answer:

The definition for the problem is listed in the section below on the explanations.

Explanation:

<u>For SQL Server</u>

  • Data Recovery: Data recovery is done well on SQL Server. It is achieved by the restoration method. Behind this, a sysadmin must reconstruct a collection of SQL backups throughout a restore series that is technically right as well as relevant.
  • Data Security: There are several approvals as well as limits for accessing main data objects or databases. These data are accessed only by the approved clients.
  • Concurrency Control: This is essentially synchronization of the evidence or information accessed by multiple users as well as from separate locations.

Concurrency or Competitiveness control becomes accomplished with SQL Server Portable, using locking to further improve security. The locking regulates how multiple individuals can simultaneously navigate & alter shared storage, without interfering with one another.

8 0
3 years ago
What is the difference between a prefix and postfix in Java?
Doss [256]

Answer:

prefix comes first

Explanation:

pre means before, and post means after.

7 0
3 years ago
Which of the following is not one of the four criteria for evaluating websites?
Flura [38]

Answer:validity

Explanation:

Because it dont sound right

5 0
3 years ago
Think about the ways new communication technologies can make certain tasks easier for
Andru [333]
Technology gives them the ability to do things that they normally couldn’t do. Like deaf people could get a cochlear implant to make them hear, people without a leg can get a prothetic leg to help them walk. Even something as simple of being colorblind, there are glasses to help them see color. It’s amazing.
3 0
3 years ago
Please help me with this! I’m using Python 3
IgorLugansk [536]

Something like this?

h1 = int(input())

m1 = int(input())

s1 = int(input())

h2 = int(input())

m2 = int(input())

s2 = int(input())

s = h2*3600 + m2*60 + s2 - (h1*3600 + m1*60 + s1)

print(s)

3 0
3 years ago
Other questions:
  • list the network characteristics of the wireless network(s) in the decode -- SSIDs, channels used, AP names, presence of Bluetoo
    6·1 answer
  • Operating systems the most common form Microsoft windows in Mac OS discuss the similarities and differences between which two sy
    13·1 answer
  • What are chemical manufacturers required to provide to anyone who purchases or uses their chemicals for a work purpose? Select a
    8·2 answers
  • A restaurant bill comes to $28.35. Find the total cost if the tax is 6.25% and a 20% tip is left on the amount before tax.​
    6·1 answer
  • Please Help Fast!!!!!! Brainliest for First to answer!!! Conflict resolution is the process of solving disputes and disagreement
    5·1 answer
  • You have been found at fault in a crash where someone was injured and was transported to a medical treatment facility. By law yo
    15·2 answers
  • Write a Python program that creates a dictionary containing course numbers and the room numbers of the rooms where the course me
    7·1 answer
  • In addition to MLA, what are some other widely used style guides? Check all that apply.
    5·1 answer
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    13·1 answer
  • Who would win in a fight iron man or bat man​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!