subject

Problem 1: Write a program named GradeDistribution. java, that accepts a number N from the command argument list, Use the number N to initialize an int array with the size of N, then assign a random grades to each elements of the grades array. Calculate and display the average grades.

Problem 2:
Write a program named TossingCoiSimulation. java, that accepts a number N from the Cmd argument list. Your program will generate N random numbers: either 0 or 1, then count and display the number of 0s and 1s.

Problem 3:
Write a program named CountChar. java, implement a method specified below:

public static int countChar(char c, String str)

This method counts the number of occurrence of the character c in the String str.

Then test your method as follows:

1. Pass a character and a string as arguments to the main method
2. Call countChar method
3. Print how many times the character appears in the String

For example, if you pass the argument o "Introduction to Java Program", your program should display:

The character "o" appears in the String 4 times.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
You know the right answer?
Problem 1: Write a program named GradeDistribution. java, that accepts a number N from the command...
Questions
question
Advanced Placement (AP), 16.11.2020 20:40
question
World Languages, 16.11.2020 20:40
question
Mathematics, 16.11.2020 20:40
question
Arts, 16.11.2020 20:40
question
Mathematics, 16.11.2020 20:40
question
Arts, 16.11.2020 20:40
question
Mathematics, 16.11.2020 20:40
question
Mathematics, 16.11.2020 20:40