Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( i need Unique answer, don't copy and paste, please) (dont' use handwriting, please) I need the answer quickly, please :((((((.. pleaaasssee heeelp mmmeeee// i

( i need Unique answer, don't copy and paste, please) (dont' use handwriting, please)

I need the answer quickly, please :((((((.. pleaaasssee heeelp mmmeeee// i need all answers, UNIQUE ANSWER please

Q3:

Write a Java program that allows the following:

1.Create an array list of 20 integers. The 20 integers are generated randomly with possible values from 0 to 10.

2.Print the content of the array list.

3.Find how many of these values are multiple of 3.

Show a screenshot of the output with your name and Id in the first line (if there is no screenshot of the output, the student shall get a zero mark for this question).

Program typical run:

Scenario 1

image text in transcribed

Scenario 2

image text in transcribed

The following snipped code can help you to write your program:

image text in transcribed

image text in transcribed

_______________

Q4:

Write a full Java program that:

1.Generate an integer random number between 0 and 6.

2.Then make a loop that keeps asking the user to guess the generated random number. If the user input is not equal to the generated random number, then print, Try again and allow the user to input another guess until the user guess correctly.

3.If the user input is equal to the generated random number, then prints, Good guess. And print how many times did the user guess until he/she guessed correctly.

Show a screenshot of the output (if there is no screenshot of the output, the student shall get a zero mark for this question).

Program typical run:

Scenario 1

image text in transcribed

image text in transcribed

run: This program is written by: Ali Abdullah, Id 17001234 The content of the array list is: 74772 9 10 1 1 8 1 39602903 9 There are 9 multiple of 3 BUILD SUCCESSFUL (total time: 0 seconds)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions