# CMPSC-F132 Computer Science Java Programs Blackboard

Anonymous
timer Asked: Mar 4th, 2019
account_balance_wallet \$20

### Question Description

write a java program based on the instructions given

Attachment preview

CMPSC-F132 Assignment 5

Spring 2019

Due: Saturday 3/2/2019 11:59pm ET

Rules/Instructions:

Homework assignments are individual assignments. Also, you must abide by the academic integrity policy as determined by the school and mentioned in the course syllabus.

Please upload your source code to Blackboard. Remember to only submit the .java file(s)

description:

For this assignment you are required to write 3 java programs. Therefore, you need to create 3 classes and submit 3 .java files (one for each problem). Here are the descriptions of the problems:

[30 points] Create a class called HW05P1. In the main method write a program that generates 100 random integers between 0 and 9 and displays the count for each number. (Hint: use an array of 10 integers to store the counts for the number of 0s, 1s,…,9s).

[30 points] Create a class called HW05P2. Inside the class write a method with the following header to find the minimum element in an array of double values:

public static double min(double[] array)

Write a test program in your main method to prompt the user to enter 10 numbers, invoke the method to return the minimum value, and display it. Here is a sample input-output:

Enter 10 numbers: 1.9 2.5 3.7 2 1.5 6 3 4 5 2.4

The minimum number is 1.5

[40 points] Create a class called HW05P3. Inside the class write a program that reads 10 numbers from input and displays the number of distinct numbers, as well as the distinct numbers in their input order, separated by space (if a number appears multiple times, it should be displayed only once). Hint: read a number and store it into an array if it is new. If the number is already in the array, ignore it. Here is a sample input-output:

Enter 10 numbers: 1 2 3 2 1 6 3 4 5 2

The number of distinct numbers is 6

The distinct numbers are: 1 2 3 6 4 5

## Tutor Answer

onesmasd
School: Rice University

Hey am throug...

flag Report DMCA
Review

Anonymous
Tutor went the extra mile to help me with this essay. Citations were a bit shaky but I appreciated how well he handled APA styles and how ok he was to change them even though I didnt specify. Got a B+ which is believable and acceptable.

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors