ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 11 Weeks Ago, 5 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 8.00

Write a program that accepts data in the following order

Java Program

 

In this question, you will design an application for a company that creates personalized house signs to compute the prices of customer orders based on the following factors:

ï‚· The minimum charge (base price) for all type of sign is $20.

ï‚· If the sign is made of wood, add an extra charge $10, if it is a plastic, add an extra charge $5. No extra charge for aluminum.

ï‚· The first 5 letters or numbers are included in the minimum charge; there is an extra $2 charge for each additional character. (Space shouldn't be counted as a character.In order to check if a character is a space or not, you can use isSpaceChar()method of Character class.)

ï‚· Black or white characters are included in the minimum charge; there is an additional $8 charge for colored lettering.

ï‚· If the total charge is more than $100, provide 25 percent of discount on total price.

 

Write a program that accepts data in the following order: order number, customer name, sign type(wood or plastic), the number of characters, and color of characters. The program should continue as long as a customer wants to order another sign.

Display all the entered data, number of the orders, and the final price for the customer to pay.* Note : You use a Scanner class's method (nextInt or nextDouble) to read a primitive value (int or double type values, respectively).

And then, if you use nextLine method toread a String, a problem (with hard-to-find reason) would occur. In this case, the Stringis never read from the keyboard (no chance for the user to enter a string) since thenextLine method is not designed to skip over an initial newline character.

Here are the solutions to overcome this problem: (For details, see the textbook Page88)1) Before getting user's input as a String, just consume the previous remaining newline using the following statement:keyboard.nextLine();OR2) Instead of using nextLine method, you can use next method to read a String

Answers

(11)
Status NEW Posted 28 Apr 2017 07:04 AM My Price 8.00

-----------

Not Rated(0)