Question: Develop a Java Program that: . Reads input from the keyboard using a Scanner Object and its methods . Displays information to the user in
Develop a Java Program that:
. Reads input from the keyboard using a Scanner Object and its methods
. Displays information to the user in various formats, including formatting numbers
. Manipulates String objects using various String methods
Project Requirements:
1. In this project, you need to use methods of Scanner and String class that will allow the user to enter infromation about two prodcuts sold at a Grocery Store and display information about the products
2. Products will consist of the following data:
a. productName- String
b. quantity- interger
c. unitPrice- double
3. The program will
a. prompt the user to enter the information for two products and store this information in the appropriately named variable. Assume product name is one word only and less than 10 characters
b. store the product name in proper case (first letter to upper case and the rest of the word to lower case. For example: apple becomes Apple, and ORANGE become Orange
c. display the data for each product and the total price in a table (see below) with the following requirements
i. Product name in Proper case
ii. Product name will be left justified
iii. Numbered data (qty, price and total price) will be right justified
iv. The price and total price will be 2 decimal places. (Use printf format specifiers)
4. Include javadoc class comment following Project Comment Template on the content page.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
