Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Java Loops and Files Part A Write a program that asks the user to enter todays sales for five stores. The program should display a

Java Loops and Files Part A

Write a program that asks the user to enter todays sales for five stores. The program should display a bar chart comparing each stores sales. Create each bar in the bar chart by displaying a row of asterisks. Each asterisk should represent $100 of sales.

Test Case: Enter sales for store 1: 1000 Enter sales for store 2: 1200 Enter sales for store 3: 1800 Enter sales for store 4: 800 Enter sales for store 5: 1900

SALES BAR CHART Store 1: ********** Store 2: ************ Store 3: ****************** Store 4: ******** Store 5: *******************

Java Loops and Files Part B

Write a program that asks the user for the name of a file. The file should be opened for reading. The program should read the contents of the file, change all characters to upper case and display the output.

UppercaseFileConverter.java

Here is the test case scenario1:

Enter the name of the file to be read: UppercaseTestData.txt HELLO THERE HOW ARE YOU HOPE YOU ARE ENJOYING THIS CLASS Files read, converted, and then closed.

Here is the test case scenario2:

Enter the name of the file to be read: abc.txt The file abc.txt does not exist or could not be opened.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students explore these related Databases questions