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 20:20
Sometimes writers elaborate on the truth when recalling past events so they can enhance their narrative essay with more interesting descriptions. do you feel that published writers should or should not embellish real life events just to make their stories more interesting?
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
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
Engineering, 06.05.2020 19:10
question
Mathematics, 06.05.2020 19:10
Questions on the website: 13722359