Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please start the work after' start your code here'. Instructions For as long as you can remember, you've never been able to get a taco

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Please start the work after' start your code here'.

Instructions For as long as you can remember, you've never been able to get a taco on Tuesday at your local taco truck. The lines are always too long and the staff are very overwhelmed. You take it upon yourself to streamline the taco ordering process to decrease the average time it takes to get a taco. You decide to create a process that will take customer orders and print them out in a neat and understandable format. To increase the efficiency of your code, you're going to use the 'Taco.java' class for every taco. You're going to write the process of creating a taco object from an order in POD.java: Taco -shell: boolean -toGo: boolean -ingredients: String +Taco () +getShell(): boolean +get ToGo (): boolean +get.Ingredients: String +set Shell (shell: boolean) +set ToGo (togo: boolean) +setIngredients (ingredients: String) +toString(): String Once you've created a Taco object, the object will be printed by making use of the 'toString()' method. Details (POD.java) Input The main method of PoD.java reads in input in the the following order (handled for you): a boolean (shell): the shell type (true if hard shell, false if soft shell) a boolean (to Go): if the order is to eat in or out a list of ingredients (ingredients): an array of strings describing which ingredients are in the taco. The 'Taco.java' class accepts a single String. Processing WHAT YOU MUST DO: Create a Taco object Assign input to Taco object Print out Taco object Output Output is already done for you by making use of the 'toString()' method in the 'Taco.java' object class. Sample input/output: Sample Input Sample Output Note: This is all on a single line! false true lettuce tomato cheese Shell: soft Order: to go Ingredients: lettuce tomato cheese import java.util.Scanner; public class POD { public static void main( String [] args) { Scanner in = new Scanner(System.in); boolean shell = in.nextBoolean(); boolean togo = in.nextBoolean(); String ingredients = in.nextLine(); // PLEASE START YOUR CODE HERE 1 == == == == == == == === == == === == = //PLEASE END YOUR CODE HERE 'System.out.println(Taco)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions