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
krok68 [10]
3 years ago
11

You can create a ____ partition to hold files that are created temporarily, such as files used for printing documents (spool fil

es and files used to record monitoring and administration data, often called log files.
Computers and Technology
1 answer:
Lisa [10]3 years ago
3 0
/var is the answer to then empty space
You might be interested in
Please Help ASAP. Marking Brainliest For Correct Answer.
mezya [45]

Answer: It is not working because it is missing the code needed to turn right.

Sentence :The robot would move forward two squares and would stay stuck there because it can not move forward nor turn left. You would need to add code for the robot to be able to turn right so that the robot can reach the goal

6 0
2 years ago
Tortise and hare race java g Modify the main class so it runs the race 100 times and reports how many times each runner wins. (T
SOVA2 [1]

Answer:

Game.java file

import java.util.Scanner;

public class Game {

/**

* t_pos and h_pos are the current positions of the Tortoise and Hare

*/

static int t_pos,h_pos;

static Tortoise tortoise;

static Hare hare;

public static void main(String[] args) {

play(); /*starting the game*/

}

public static void play(){

/**

* the method will starts the play, loop until the game is over, displays the winner

* and prompts the user if they want to play again

*/

/**

* defining Tortoise and Hare objects

*/

tortoise=new Tortoise();

hare=new Hare();

t_pos=1;

h_pos=1;

System.out.println("The race is about to start");

tortoise.printTrack();

hare.printTrack();

while(t_pos != 50 && h_pos !=50){

System.out.println("\n\n\n"); /*printing blank lines*/

t_pos=tortoise.move(); /*moving and getting the current position of tortoise*/

h_pos=hare.move();/*moving and getting the current position of hare*/

tortoise.printTrack(); /*displaying the tracks*/

hare.printTrack();

try { /*comment this part to skip the 1s break between each round; for testing*/

Thread.sleep(1000);

} catch (InterruptedException e) {

e.printStackTrace();

}

}

System.out.println("\nRace Over");

if(t_pos==50 && h_pos==50){

System.out.println("Its a tie");

}

else if(t_pos==50){

System.out.println("Tortoise wins");

}else if(h_pos==50){

System.out.println("Hare wins");

}

System.out.println("Do you want to play again? (y/n)");

Scanner scanner=new Scanner(System.in);

String ch=scanner.next();

if(ch.equalsIgnoreCase("y")){

play();

}else if(ch.equalsIgnoreCase("n")){

System.out.println("Thanks for playing, Goodbye");

}else{

System.out.println("Invalid choice, quitting..");

}

}

}

//Tortoise.java

public class Tortoise {

/**

* the current position of the tortoise

*/

int position;

/**

* track array

*/

char[] track;

/**

* speed of tortoise

*/

int speed=1;

public Tortoise() {

position=0;

track=new char[50];

for(int i=0;i<track.length;i++){

/**

* filling the track

*/

track[i]='-';

}

}

public int move(){

if(position<track.length){

position=position+speed;

}

return position+1;

}

public void printTrack(){

/**

* the current position of tortoise will be displayed by 'T' everything else will be '-'

*/

System.out.println();

for(int i=0;i<track.length;i++){

if(i==position){

System.out.print('T');

}else{

System.out.print(track[i]);

}

}

}

}

//Hare.java

import java.util.Random;

public class Hare {

int position;

int speed=10;

char[] track;

/**

* Random object to generate a random number

*/

Random random;

/**

* resting percent denotes how much time Hare will be resting

*/

int resting_percent=90;

public Hare() {

position=0;

track=new char[50];

for(int i=0;i<track.length;i++){

track[i]='-';

}

random=new Random();

}

public int move(){

int n=random.nextInt(100-1)+1; /*generating a random number between 1 and 100*/

if(n<=resting_percent){

/**

* at rest; will not move, returns the current position.

*/

return position;

}else{

/**

* not resting..

*/

if(position<track.length){

if(position+speed>=track.length){

position=track.length-1;

}else{

position=position+speed;

}

}

return position+1;

}

}

public void printTrack(){

System.out.println();

for(int i=0;i<track.length;i++){

if(i==position){

System.out.print('H');

}else{

System.out.print(track[i]);

}

}

}

}

/*Output (partial and random)*/

The race is about to start

T-------------------------------------------------

H-------------------------------------------------

-T------------------------------------------------

H-------------------------------------------------

--T-----------------------------------------------

H-------------------------------------------------

---T----------------------------------------------

----------H---------------------------------------

.

.

.

.

-----------------------------------------------T--

-------------------------------------------------H

Race Over

Hare wins

Do you want to play again? (y/n)

y

The race is about to start

T-------------------------------------------------

H-------------------------------------------------

-T------------------------------------------------

H-------------------------------------------------

.

.

.

.

-----------------------------------------------T--

--------------------H-----------------------------

------------------------------------------------T-

--------------------H-----------------------------

-------------------------------------------------T

--------------------H-----------------------------

Race Over

Tortoise wins

Do you want to play again? (y/n)

n

Explanation:

3 0
3 years ago
Simplify the expresion<br>12. 12g + 9g​
Lerok [7]
12g + 9g simplified is 21g
7 0
3 years ago
Timing can be a major factor in the success of a business incorporation and emerging technology. Describe one potential problem
Serga [27]
The price could go up, it might not work then later down the road
5 0
2 years ago
Read 2 more answers
Describe how electrons move between atoms to create electricity.
pentagon [3]
Applying potential difference to a conductor, by potential force, free electrons gain energy and move from low to high potential. Thus, electrons move from one atom to another.
3 0
2 years ago
Read 2 more answers
Other questions:
  • Write down a recurrence relation for this version of QuickSort, and solve it asymp-totically. Show your work. Assume that the ti
    13·1 answer
  • How to connect to my wireless printer for dummies?
    12·1 answer
  • Which are malicious codes? <br><br> JavaScript <br> Key loggers <br> Scrum <br> Spyware <br> Worms
    12·1 answer
  • Which answer best describes an unsubsidized federal loan
    9·1 answer
  • A client accessing a network share folder has authenticated into the system and has full access rights to a folder share. But af
    11·1 answer
  • Which of the following is an unintended consequence of pesticide use on crops?
    10·1 answer
  • Consider a movie database in which data is recorded about the movie industry. the data requirements are summarized as follows:
    15·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • ________ is a computer-based network that triggers actions by sensing changes in the real or digital world.
    15·2 answers
  • PLEASE HELP!!!!!!!!!!! The Excel tool that extends the height of a selected cell so that all the text fits into the cell and is
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!