Solved by Expert Tutors
Solved by Expert Tutors
Question

Intro to Java Programming and CS. Please help me with the following question:

Following the instructions given in the textbook and the accompanying website on how to compile and run Java programs, write three programs named as required (see below), and make one submission of the assignment with separate file attachments for each program; therefore, for this assignment, there will be three attachments. Each attached file will be a java program with a file name of "program name.java." [MO1.1, MO1.2, MO1.3]

1. what is a well-documented (commented) program, "RanNumGen," that takes an integer command-line argument "n" that indicates the number of random numbers to generate and uses the method "Math.random()" to print uniform random values between 1 and 100 (both inclusive), and then prints the minimum and maximum value. [MO1.1, MO1.2]

  • Sample runs would be as follows.
  • >java RanNumGen 5
  • 67  24  31  11  80
  • The minimum value is 11.
  • The maximum value is 80.
  • >java RanNumGen 8
  • 2  76  29  96  91  98  35  16
  • The minimum value is 2.
  • The maximum value is 98.
  • 2. what is a well-documented (commented) program, "AndOp," that prints "true" if two double values given as command line arguments are both strictly between 0 and 1; otherwise, it prints "false." [MO1.1, MO1.2]

  • Sample runs would be as follows.
  • >java AndOp 0.5 0.2
  • true
  • >java AndOp 0.4 1.0
  • false
  • >java AndOp 0.7 0.0
  • false
  • >java AndOp 0.3 0.9
  • true
  • 3: what is a well-documented (commented) program, "LC," that, using one "for loop" and one "if statement," prints the integers from 1 to 100 with ten integers per line. [MO1.1, MO1.2, MO1.3]

Step-by-step answer

The student who asked this found it Helpful

en


itur laoreet. Nam risu

o

rem ipsum dolor sit amet, consectetur adi

dictum vitae odio. Donec aliquet. Lo

sus ante, dapibus a moles

m ipsum dolor si

m risus ante,

gue vel laoreet ac, dic

ac, dictum vitae odio. Donec aliquet. Lo

dictum vitae odio. Done

fficitur laoreet. Nam risus

ipiscing el

nec facilisis. Pellente

o. Donec aliquet. Lorem ipsum

ipiscing el

ffi

m

gue vel laoreet ac, dic

e vel laoreet ac, dictum vitae odio.

ffi

m

trices ac magna. Fusce dui lectus, congue vel laore

dictum vitae odio. Donec aliquet. Lorem ipsum dol

ci

o





te


, ultrices ac magn

o

rem ipsum dolor sit amet, consectetur adi

nec facilisi

risus ante, dapibus a molestie consequat, ultrices

acinia pulvinar tortor nec facilisis. Pellentesque

nec facilisi

trices ac magna. Fusce dui lectus, congue vel lao

tesque dapibus efficitur laoreet. Nam risu

a molestie

sus ante, dapi

fficitur laoreet. Nam risus ante, dapibus a m

a molestie


ci

o





sum


molestie consequa

o

rem ipsum dolor sit amet, consectetur adi

nec facilisi

gue vel laoreet ac, d

ctum vitae odio. Donec aliquet. L

fficitur laoreet. Nam risus an

Fusce dui lectus, congue vel laoreet ac, dictum

a. Fusce dui lectus, congue vel l

o. Donec aliquet. Lorem ipsum dolo

lestie consequat,

ultrices ac magna. F

a. Fusce dui lectus, cong

sum dolor sit amet, consectetur adipiscing

ultrices ac magna. F

a molestie


ci

o

acinia pulvi

s a molestie consequat, ultrices ac magna. Fusc



ct


3.PNG

4.PNG


acinia pulvinar


1.PNG


a. Fusce dui l


2.PNG






te


5.PNG



cing elit. Nam l


a. Fusce dui lec


m ri






sum


6.PNG



cing elit. Nam l


acinia7.PNG

1.PNG
r

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Java Programming tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes