Hello, Can someone help e with this Java problem. Please ?
One interesting application of computers is to display graphs and bar charts. Write an application that reads five numbers, between 1 and 30. For each number that’s read, your program should display the same number of adjacent asterisks. For example, if your program reads the number 7, it should display *******. Display the bars of asterisks after you read all five numbers. Show a few running results in the word document.
public class Charts {
public static void main(String[] args) {
Scanner sc = new
Scanner(System.in);
int arr[]=new int[5];
for(int i=0;i<5;i++) {
arr[i]=sc.nextInt();
}
for(int i=0;i<5;i++) {
System.out.print(arr[i]+" : ");
for(int
j=0;j<arr[i];j++)
System.out.print("*");
System.out.println();
}
}
}

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Hello, Can someone help e with this Java problem. Please ? One interesting application of computers...
Using C# One interesting application of computers is to display graphs and bar charts. Write an app that reads three numbers between 1 and 30. For each number that’s read, your app should display the same number of adjacent asterisks. For example, if your app reads the number 7, it should display: ******* If possible please include screenshot of source code and output Thank you
Complete each of the following exercises from the Deitel book, using the indicated C# project names. You should use a .NET Framework Console application type for each project. All projects should be part of a single solution named: Cs2Apps. How to setup multiple Projects in one Visual Studio Solution When creating the first Project, make sure to uncheck the box for putting the solution and the project in the same folder. This will create a separate folder with the solution...
Hello Sir, I need help with Java. Here is the problem below. Problem 1.Write a program that prompts the user to enter the number of milliseconds and converts the milliseconds to a string hours:minutes:seconds. The program should use the convertMillismethod with the following header: public static String convertMillis(long millis) For example, convertMillis(5500) returns the string 0:0:5, convertMillis(100000) returns the string 0:1:40, and convertMillis(555550000) returns the string 154:19:10. Problem 2. (Count occurrence of numbers)Write a program that reads integers between 1...
Can someone please help me with how to write this in Java? You will write a program to evaluate a math expression given by a user. • Read the input from the scanner • Expressions should match the forms below. Note that you will need spaces between the numbers and operators for your scanner methods to work best. - “number1 operator number2” - “operator number1” • Declare number1 and number2 as type integer. Test using integer values. • You must...
use JOptionPane to display output Can someone please help write a program in Java using loops, not HashMap Test 1 Grades After the class complete the first exam, I saved all of the grades in a text file called test1.txt. Your job is to do some analysis on the grades for me. Input: There will not be any input for this program. This is called a batch program because there will be no user interaction other than to run the program....
Can someone please help with this in JAVA? Write one application program by using the following requirements: 1) Exception handling 2) Inheritance a) At least one superclass or abstract superclass: this class needs to have data members, accessor, mutator, and toString methods b) At least one subclass: this class also needs to have data members, accessor, mutator, and toString methods c) At least one interface: this interface needs to have at least two abstract methods d) At least one method...
Write a Java Program that performs the following functionalities: and you can use if statements, cases, and string methods Enter a new main sentence Find a String Find all incidents of a String Find and Replace a String Replace all the incidents of a String Count the number of words Count a letter’s occurrences Count the total number of letters Delete all the occurrences of a word Exit The program will display a menu with each option above, and then...
Can somebody help me with Java programming? please be brief and explain the process and carefully follow the step by step instruction. Thanks Homework 12.1 - Write a program that generates five random sentences (like mad libs), prints them to a file, then reads in the sentences and prints them to the console. Start by creating four string arrays for nouns, verbs, colors, and places. They should store at least 5 of each type of word. You can have more...
In Jgrasp(Java) Thanks!
This solution must use methods. It is recommended to use methods for this solution. Write a program that reads an integer and displays, using asterisks, a filled and hollow square, placed next to each other. For example, if the side length is 5. the program should display: ***** ***** You can assume that the user will enter a side length that is at least 2. If user enters a number smaller than 2, and your program has...
Help with java . can someone make it compile with pictures please! For this project, you will design and implement a program that analyzes baby name popularities in data provided by the Social Security Administration. Every 10 years, the data gives the 1,000 most popular boy and girl names for kids born in the United States. The data can be boiled down to a single text file as shown below. On each line we have the name, followed by the...