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
Lelu [443]
3 years ago
7

ANSWERED CORRECT BELOW

Computers and Technology
1 answer:
ch4aika [34]3 years ago
8 0

Answer:

Explanation:

The Java code provided in the question works as intended. The nextInt() correctly outputs the random value from 1-10 while the nextInt(int min, int max) correctly outputs random values between the int and max parameters. I changed the int/max arguments to 3 and 12 and ran the program to demonstrate that the program is running as intended. Output can be seen in the attached picture below.

You might be interested in
Java Programming Using nested if statement For a student to be accepted in XYZ College, the student must meet the following requ
mihalych1998 [28]

Answer:

Follows are the solution to this question:

import java.util.*;//import package  

public class Main//defining a class

{

       public static void main(String[] ags)//main method  

       {

       float GPA;//defining floating point variable  

       int annual_income;//defining integer variable

       Scanner ga = new Scanner(System.in);//creating Scanner class object

       System.out.println("Enter GPA of student family : ");//print message

       GPA= ga.nextFloat();//input value from user-end

       System.out.println("Enter annual income of student family : ");//print message

       annual_income= ga.nextInt();//input value from user-end

      System.out.println("Is student resident of New Jersey(y/n) :");//print message

       char a=ga.next().charAt(0);//defining char variable to input char value

if(GPA>=3.75) //use if block to check GPA value

       {

        if(annual_income>60000) // use if to check annual income value

         {

            if((a == 'y'|| a== 'Y')) //use if to check char value

   System.out.println("Student accepted in college");//print message

            else//defining else block

             System.out.println("Student is not accepted in college because he/she not resident of New Jersey ");//print message

         }

        else//defining else block

          System.out.println("Student is not accepted in college because annual income is less than $60000 ");//print message

    }

   else//defining else block

    System.out.println("Student is not accepted in college because GPA is less than 3.75 ");//print message

       }

}

Output:

Please find the attached file.

Explanation:

Please find the attached file of the pseudocode.

In this code one integer, one float, and char variable "GPA, annual_income, and a" is declared, that uses the scanner class for accept value from the user-end, and in the next step, nested if the statement is used that checks the GPA value, annual_income, and a value and use the print method to print a value with the message.

6 0
2 years ago
Describe shortly about the following Linux directories and theirpurpose,1. lib2. etc3. Boot4. Root5. home
Bingel [31]

Answer:

 Linux directories and their purposes are:

1) lib - Lib file contained the share object library file which necessary to boots system and this directory contain file module stored in the kernel.

2) etc - etc file is the configuration file that they are local in the machines. When the program run these file are stored in the directories. this can be static and do not executable directory.

3) Boot - Boot file are stored in the directory which required processing of linux boot and such files are included in the linux kernel of the file.

4) Root - Root file are the best user root directory and user cannot view this directories from there account. This file usually contain administrative file system.  

5) Home - Home file contained the user directory and it is the default system of linux. Home directory helps user to enable any network system to access there home directories.

5 0
2 years ago
On a client/server network, data does not necessarily follow the same path between the request (client) and the response (server
Andrej [43]

Answer:

SSL and HTTPS play a factor

6 0
2 years ago
PLEASE HELP
kap26 [50]

Answer:

dog

Explanation:

The python program has four lists, A, B, C, and E which is a list of the first three lists. Lists are unordered indexed data structures, it is accessed by an index starting from 0 to n (which is the length of the list minus one).

The E list is a list of lists with three list items starting from index zero to two. E[0][1] is used to access the item "dog" in the first list item of the E list.

3 0
2 years ago
T in your computer will you use to plug in your camera?
Gnom [1K]
A tool in your computer that you will use to plug in your camera is the Universal Serial Bus (USB). If you camera has this chord and it is an Universal Serial Bus type. Then what you need is your software installer of the camera and only the USB.
7 0
3 years ago
Other questions:
  • According to a recent study, more than 75 percent of teens between the ages of twelve and seventeen in the United States have a
    11·2 answers
  • You can send messages that include photos and videos between mobile devices using ________ technology.
    12·1 answer
  • Drag each label to the correct location on the image.
    10·1 answer
  • Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the
    6·1 answer
  • What is not an option when a user is exporting contacts to share with others?
    10·1 answer
  • The World Wide Web is full of unstructured data. Search engines like Google, Bing and Yahoo have been doing a good job of allowi
    6·1 answer
  • If you want to insert a table which ribbon should you select
    13·2 answers
  • Menus are attached to the windows by calling
    15·1 answer
  • What is the function of a breadcrumb trail in a website?
    13·1 answer
  • A ____________ is a collection of commands given a name.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!