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
Greeley [361]
3 years ago
11

Write a program that asks the user for the name of their dog, and then generates a fake DNA background report on the pet dog. It

should assign a random percentage to 5 dog breeds (that should add up to 100%!)
Computers and Technology
1 answer:
sukhopar [10]3 years ago
6 0

Answer:

Code:

import java.util.*;

public class Main{

public static void main(String []args){

 

Scanner sc = new Scanner(System.in);

System.out.println("What is your dog's name?");

// Entering name of dog

String name = sc.nextLine();

 

System.out.println("Well then, I have this highly reliable report on " + name + "'s prestigious background right here.");

 

System.out.println("\n\nSir " + name + " is\n\n");

 

//Generating random numbers

Random ran = new Random();

int sum = 0;

int a = 0;

int b = 0;

int c = 0;

int d = 0;

int e = 0;

while(sum != 100)

{

a = ran.nextInt(100);

b = ran.nextInt(100-a);

c = ran.nextInt(100-b);  

d = ran.nextInt(100-c);

e = ran.nextInt(100-d);

sum = a + b+ c + d + e;

}

 

System.out.println(a + "% St. Bernard");

System.out.println(b + "% Chihuahua");

System.out.println(c + "% Dramatic RedNosed Asian Pug");

System.out.println(d + "% Common Cur");

System.out.println(e + "% King Doberman");

 

System.out.println("\n\nWow, that's QUITE the dog!");

 

}

}

You might be interested in
On a client/server network, which computer initiates the process of assigning an IP address through DHCP?
Vera_Pavlovna [14]

Answer:

The client

Explanation:

On a client/server network, THE CLIENT computer initiates the process of assigning an IP address through DHCP. This is because "The Client" computer will serve as the Domain controller in which other computers of the network can find. Hence, The Client computer initiates the process of assigning IP addresses through DHCP to achieve this.

Though, in some case. A user can manually assign the IP address to computer if it is not through DHCP

4 0
3 years ago
Say anything :) teeheeheheheheehhehe
nataly862011 [7]

Answer:

905 shooter slidin on the block he shot at opps no he got can stop running from the cops...

Explanation:

ON GANG PRRRA...

3 0
3 years ago
Read 2 more answers
How many features are there in the team​
sdas [7]

Answer:

<h3><u>Component Team</u></h3>
  • Leads to 'invented' work and a Forever-Growing Organization
  • Dependencies between teams leads to additional planning
<h3><u>Feature Team</u></h3>
  • Leads to customer focus,visibility and smaller organization
  • Minimizes dependencies between teams and increase flexibility

4 0
2 years ago
The good example of pivoting is changing thedimensions along the axis.? True? False
ollegr [7]

Answer:

False

Explanation:

The good example of pivoting is NOT changing the dimensions along the axis.

5 0
3 years ago
Which wireless communication is typically limited to six feet of distance?
Nutka1998 [239]

Answer:

Bluetooth

Explanation:

Bluetooth is a standard to share data between Mobil devises, typically less than 10 m (33 ft), up to 100 m (330 ft), but the Bluetooth 5.0 has a range of 40–400 m (100–1,000 ft), in addition, NFC is something similar because needs a separation of 10 cm or less, and with RFID we can read to hundreds of meters.

3 0
3 years ago
Other questions:
  • The incident response team reviewed the security logs and discovered that the network had been breached, due to a misconfigured
    11·1 answer
  • WILL MARK BRAINLIEST HELP
    8·2 answers
  • Tiffany is an instructor at a college that is run on student tuition and not state taxes. Which statement best describes her emp
    6·2 answers
  • The city government of Los Angeles recently upgraded its information technology infrastructure​ and, for the first​ time, implem
    14·1 answer
  • What is a traffic controller?what are its functions?
    13·1 answer
  • A hockey stick hits a puck on the ice. identify an action-reaction pair in this situation.
    10·1 answer
  • How do I write the yearly salary for something without copying it word for word? I'm doing a PowerPoint ( which you had to choos
    15·1 answer
  • Suppose that a program asks a user to enter multiple integers, either positive or negative, to do some calculation. The data ent
    13·1 answer
  • All the network nodes are connected to each other
    8·1 answer
  • Importance of folders on a computer <br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!