Question: Write In Java program Write a Wings and WingsRUs class. The Wings instance variables should be the name, a Boolean field for whether the wings

Write In Java program

Write a Wings and WingsRUs class. The Wings instance variables should be the name, a Boolean field for whether the wings have bones or not, the cost for each wing and the number purchased. You decide appropriate variable names and data types. Write a no-argument and full constructor, a toString() method, and your getters and setters, in that order. Write a method named totalCost() after your toString() method that calculates and returns the cost for the wings. It should take no parameters and return a double. Give the customer a 10 percent discount if they buy over a dozen wings.

In the Driver, create two instances of the Wings class. With the first one, call the full constructor (you can use whatever values you like just hard code them in). For the second one, use the no-argument constructor followed by the setters to set the field values. These values need to come from keyboard input from the user. Call the toString() method to print each out. Next, call just the totalCost() method so it print out the cost for the order. Make certain it is formatted like money. SEE SAMPLE OUTPUT BELOW Write In Java program Write a Wings and WingsRUs class. The Wings

WingsRUs What kind of sauce? BBQ Are there bones (please answer true or false) false How much does each cost? .60 How many can you eat? 14 Your orders: You bought 6 Hot wings which cost $1.25 each Bon es: true You bought 14 BBQ wings which cost $0.60 each Bones: false The costs of the orders were: First $7.50 Second $7.56

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!