[solved]-Create New Java Application Called Ecommerceapp Without Quotation Marks Whose Main Method Q39044701
Then create a new Java application called “ECommerceApp”(without the quotation marks) whose main method follows thepseudocode below, and whose other methods are as specifiedbelow.
Print the banner message
Get the products catalog String
Get the product order from the user and check it exists in theproducts catalog String
If the product exists Get the product price Compute the product taxCompute the total sale
Output the total sale Else Output “The product was not found.”
Your program must include the following methods:
- A method called bannerPrinter that takes no parameter and hasno return value. bannerPrinter outputs a greeting to the commandline as shown below.
******************************************
====== Welcome to my eCommerce app! ======
******************************************
(print a blank line after the banner) - A method called productsBuilder that takes no parameters andreturns a String. In the method body construct a String (name itproductsCatalog) and populate it with items, each of which must be10 characters long. For any product less than 10 characters, padthe remainder with spaces. You don’t need to get the values fromthe user, just populate the String with 3 product names. Forexample, product 1 might be “Desk “, product 2 might be “Table “,and product 3 might be “Pen “. All 3 of these products are withinthe productsCatalog String.
- A method called getOrder that takes a String as a parameter(the productsCatalog String) and returns a boolean. In the methodbody, first display the productsCatalog String to the user. Thenprompt the user to enter a product name (a String), and checkwhether the product name exists in productsCatalog. If it exists,return true, otherwise return false.
- A method called getPrice that returns a double. In the methodbody generate a random number between 1 and 100 (Hint: SeeHorstmann Section 4.9.2.) and return this value as the price.
- A method called getTax that takes a double as a parameter (theprice) and returns a double. Compute the return value as 10% of theparameter value (i.e. 10% of the price). This is the tax.
- A method called getTotal that takes two doubles as parameters(the price and the tax) and returns a double. The return value iscomputed as the sum of the two parameters (the return value is thesale total).
- A method called printTotal that takes a double as a parameter(the sale total) and has no return value. This method outputs thefollowing to the command line: “Your sale total is: $X” where X isthe sale total parameter value.
All currency amounts that your program outputs should show aleading “$” followed by the whole number, a decimal, and twodecimal positions.
MUST BE IN JAVA
Expert Answer
Answer to Then create a new Java application called “ECommerceApp” (without the quotation marks) whose main method follows the pse… . . .
OR

