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
Zinaida [17]
3 years ago
8

We have constructed a Player Class for you. Add the following: public static variable: int totalPlayers Static variable should b

e an int. The value should be incremented whenever a new Player is constructed. public static variable: int maxPlayers Static variable should be an int. Set its value to 10. public static method: gameFull() The gameFull() static method should return a boolean of whether the total players is greater than or equal to the maxPlayers static variable.
Computers and Technology
1 answer:
Margaret [11]3 years ago
5 0

Answer:

public class Player {

   public static int totalPlayers = 0;

   public static int maxPlayers = 10;  

   public static boolean gameFull() {

       return totalPlayers >= maxPlayers;

   }

   public Player() {         // Player class constructor

       totalPlayers++;

   }

}

Explanation:

The Java program defines the class Player which has two public class variables and a public method. The class constructor increases the totalPlayer variable by one for every player object created.

You might be interested in
How would you justify using cloud computing?
podryga [215]

Cloud Computing

Explanation:

1.Cloud computing allows employees to be more flexible in their work practices. For example, you have the ability to access data from home, on holiday, or via the commute to and from work (providing you have an internet connection).

2.Network capabilities are extended without requiring investment in new infrastructure, personnel, or software. Technology is integrated into every-day appliances allowing them to interconnect with other devices, making them more 'smart' or automated.

3.Cloud computing benefits

  • Efficiency / cost reduction. By using cloud infrastructure, you don't have to spend huge amounts of money on purchasing and maintaing equipment.
  • Data security.
  • Scalability.
  • Mobility.  
  • Disaster recovery..
  • Control.
  • Competitive edge.

4.Cloud environments promise several benefits such as reduced expenses and simplicity to ser- vice providers and service requesters [Foster et al. ... 2010], trust management and security are ranked among the top 10 obstacles for adopting cloud computing

6 0
3 years ago
What is an example of a device that commonly use Linux today
slava [35]

Answer:

include iPods, PlayStations, Xbox, TiVo, and WRT54G.

Explanation:

3 0
2 years ago
Read 2 more answers
9- Write a program in MARIE to add three numbers.
Korvikt [17]

A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

<h3>What is program?</h3>

Software, which also contains documentation and other intangible components, comprises computer programs as one of its components.

The source code of a computer program is the version that can be read by humans. Since computers can only run their native machine instructions, source code needs to be run by another software.

Using the language's compiler, source code may be converted to machine instructions. (An assembler is used to translate programs written in machine language.) An executable is the name of the generated file.

Therefore, A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

To learn more about program, refer to the link:

brainly.com/question/11023419

#SPJ1

8 0
1 year ago
Which sequence represents the hierarchy of terms, from smallest to greatest?
Anni [7]

Answer:

b

Explanation:

7 0
2 years ago
What is the output of the following code snippet if the variable named cost contains 100? if cost &lt; 70 or cost &gt; 150 : dis
DanielleElmas [232]

Answer:

The output is: Your cost is  100

Explanation:

Given

The above code snippet

and

cost = 100

Required

Determine the output of the code

if cost < 70 or cost > 150

The above condition checks if cost is less than 70 or cost is greater than 150

This condition is false because 100 is neither less than 70 nor is it greater than 150

So, the else statement will be executed.

discount = cost

Which means

discount = 100

So, the print instruction will print: Your cost is  100

6 0
3 years ago
Other questions:
  • A motherboard has four DIMM slots; three slots are gray and the fourth is black. What type of memory is this board designed to u
    6·1 answer
  • Can someone help me to give this guy brainliest the button is not there
    8·1 answer
  • What are some ways tables can be inserted into a document? Check all that apply.
    5·2 answers
  • Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
    6·1 answer
  • Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all th
    11·1 answer
  • A website's ____ page provides basic information about the individual or organization and includes a navigation bar with links t
    13·1 answer
  • Jackie created a poster for a rock band. Which file format will best preserve the graphics? 20PTS​
    14·2 answers
  • Complete the sentence.<br> Python is a_____<br> level language compared to bytecode.
    7·2 answers
  • What is professional education? <br><br><br><br><br>Please help me to do this.​
    7·2 answers
  • Several small stores rent space within a larger shopping centre. The owners of the shopping centre have provided a physical netw
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!