What value will be output first

Assignment Help JAVA Programming
Reference no: EM132057172

Refer to the attached Java program. Walk through the program. Do not compile or run it! You may use any text as a reference.

1. What value will be output first?

a. Odd

b. Even

c. OOPS

d. 10

e. none of the above

2. What value will be output second?

a. Odd

b. Even

c. OOPS

d. 5

e. none of the above

3. What value will be output third?

a. Odd

b. Even

c. OOPS

d. 5

e. none of the above

4. What value will be output fourth?

a. Odd

b. Even

c. OOPS

d. 0

e. none of the above

5. What value will be output fifth?

a. Odd

b. Even

c. OOPS

d. 6

e. none of the above

6. What value will be output sixth?

a. Odd

b. Even

c. OOPS

d. 3

e. none of the above

7. What value will be output seventh?

a. 4

b. 5

c. 6

d. 7

e. none of the above

8. What value will be output eighth?

a. 4

b. 4.0

c. 4.8

d. 8.4

e. none of the above

9. What value will be output ninth?

a. 0

b. 3

c. 6

d.10

e. none of the above

10. What value will be output tenth?

a. 1

b. 3

c. 5

d. 10

e. none of the above

Data for Quiz# 11

Input from the following collection in order as required: {10, 5, 0, 6, 3, 4, 1, 7}

Import.java.io.*;

Public class Quiz11Driver

{

Public static void main (string args []) throws IOException

{

Quiz 11 app;

App = new Quiz11();

App.appMain();

}

}

Class Quiz11

{

BufferedReader stdin;

Int count, tot, min, x, y, mincount;

Float avg;

Public void appMain() throws IOException

{

rptInit();

for (count = 1; count <-5; count++)

{

loopA();

}

--count;

Avg = total/count;

rptOut();

}

void rptInit()

{

Stdin = new BufferedReader (new InputStreamReader (system.in));

Tot = 0;

Min = 100;

}

void loopA() throws IOException

{

Getinput();

Y = x%2;

updateLoop();

checkIn();

}

Void getInput () throws IOException

{

System.out.print("Enter a whole number:");

X = Integer.parseInt(stdin.readLine());

}

Void updateLoop()

{

Tot += x;

If (x < min)

{

min = x;

minCount = count;

}

}

Void checkIn()

{

Switch (y)

{

Case 0:

System.out.println("Even");

break;

Case 1:

System.out.println("Odd");

break;

default:

System.out.println("OOPS");

break;

}

}

Void rptOut()

{

System.out.println(tot);

System.out.println(count);

System.out.println(avg);

System.out.println(min);

System.out.println(minCount);

}

}

Reference no: EM132057172

Questions Cloud

Compound relational operators-weekly tax withholding : Create a program that will calculate the weekly average tax withholding for a customer, given the following weekly income guidelines:
Program that interviews the users about name : I need a program that interviews the users about their name, how many houses they have and what the purchase price was for each of their houses.
What are the key constructs required to createa loop : What are the key constructs required to createa loop? Identify two scenarios that may require two different types of loops.
Design a program that uses a loop to display : Design a program that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes.
What value will be output first : Refer to the attached Java program. Walk through the program. Do not compile or run it! You may use any text as a reference.
Application you choose and the class within that application : Describes the application you choose and the class within that application. Identify one or two key distinctions within that class that would prompt you
Define a two-dimension array : 1. Define a two-dimension array with 10 rows and 2 columns.
Constructive feedback on the criteria : Actively participate in this discussion by providing constructive feedback on the criteria, rationales, and examples posted by your peers.
Populate the array elements with random values : Provide the specific Java nested loop you would use to populate the array elements with random values.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd