Questions
v Write a program that calculates and displays different suggested tip amounts, much like you see...

v

Write a program that calculates and displays different suggested tip amounts, much like you see at the bottom of restaurant bills. Here is a sample execution:

Sample Execution:

Enter the total bill amount: $50
Suggested Tip Amounts:
10%: $5.00(for okay service)
15%: $7.50(for good service)
20%: $10.00(for great service)
Total with tip: $57.50

Requirements:

  • 2 pts - When you name your file use your last name – for example: LastNameHW04.py

  • 3 pts - Place a comment at the top of your code with your name and the purpose of the program.

  • 10 pts - The program should start by asking the user for input exactly in the form

    below. Their response (input) should be stored in a variable. The amount they enter should be converted to a float in order to allow for decimals to be entered and to do math using it.

              Enter the total bill amount: $
    
  • 15 pts - Use three lines of code to store the 10%, 15% and 20% tip values into three different variables.

  • 10 pts - Variables names must follow Python standard naming conventions.

  • 5 pts – For output, the program should first display the statement below on one line:

              Suggested Tip Amounts:
    
  • 30 pts – Next, use three lines of code to print the calculated tip amounts exactly as shown below. There should not be a space after the $, and to output the % symbol, enter %%. The values in red below will vary based on the user input:

    10%: $5.00(for okay service) 15%: $7.50(for good service) 20%: $10.00(for great service)

  • 5 pts - Include additional comments throughout your code explaining what your code does. Remember comments start with #.

  • 20 pts - Extend the program to output an addendum to the receipt that adds a mandatory 15% tip to the total bill amount. You will need an additional variable to store the final cost after adding the tip to the toal bill amount. Output the final total.

Prompt for input

Example of Input: 50

Total with tip: $57.50

In: Computer Science

Can anyone please sort the differential evolution alogrithim for the sake of automatic time table generator?

Can anyone please sort the differential evolution alogrithim for the sake of automatic time table generator?

In: Computer Science

suppose we have string like jason-458164888 how do we check if the numbers are vaild where...

suppose we have string like jason-458164888
how do we check if the numbers are vaild where the first number should be 4 and length of 9.
use simple program.

In: Computer Science

What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your...

What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them?

In: Computer Science

Create one major Activity Diagram & one major Sequence diagram for the BigBasket Platform. (The solution...

Create one major Activity Diagram & one major Sequence diagram for the BigBasket Platform. (The solution should not be handwritten)

** You take any process or section or functionality of BigBasket Platform and make the above-mentioned Diagrams for it.**

In: Computer Science

We will be creating an application that will allow the user to enter an order, delete...

We will be creating an application that will allow the user to enter an order, delete an order, or display the total of all orders in the system.

Create a new .NET Frameword Console Application project in Visual Studio called “OrderTest.” Rename the Program.cs file to OrderTest.cs.

Inside the OrderTest class, but outside of the Main method, create a new static Random object.

Add a class to the project and call it “Order.” In Order there should be a static decimal named Total available for public access. There should also be the following members:

CustomerName (string)
OrderNum(int)
SubTotal(decimal)
Item1(string)
Item2(string)
Item3(string)
Item4(string)

Each of the members in Order should have the appropriate get and set properties. You can use the auto-implementation of the properties, or create the instance variables and the properties separately.

In Order create a method called “DisplayOrder” that uses all of the properties created in step 4 to print the order out to the console. There should also be a default constructor and a constructor that takes 7 arguments used to initialize the members of the class.

In OrderTest class create two static methods: One called UpdateTotal that takes a decimal as an argument. This method will update the static Total variable of the Order class, so the decimal passed to the method is added to Total. The second static method should be called DisplayTotal. This method takes no arguments but prints the Total from the Order class out to the console when called.

In the Main method of OrderTest declare the following:

selection(char)
orderEdit(int)
oNum(int)
endMenu(bool) initialized to false

Create 3 objects of the Order class called order1, order2, and order3. The first two should use the constructor that takes the 7 arguments as follows: (378, "Bon", "Yeriyaki", "Rice", "Pudding", "Butter", 59.25M) and (124, "Meat", "Celery", "Pasta", "Soup", "Lemonade", 49.35M). Immediately after creating these objects you should add the SubTotal of each order to the Total of the Order class. Use the method created in Step 6 to accomplish this. If working correctly then the following code is how this will be accomplished…

Order.Total = UpdateTotal(order1.SubTotal);

The third object should use the default constructor.

Prompt the user with the following info asking them to make a selection. Replace the name "Abigail" with your own name:

Welcome to Abigail's Restaurant!
Please make a selection below...
a) Begin an order
b) Delete an order
c) Display Total of All orders
d) Exit
10.) The user input should be assigned to the "selection" char variable declared earlier. The "selection" should then be checked in a switch statement.

If 'a' is typed in then use the "Next()" method of the Random object with an argument of 1000 to generate a random number between 0 and 999. This random number should be assigned to the oNum variable. This is the OrderNum of the order3 object created. Prompt the user to enter the customer name (with no spaces), items 1-4, (with no spaces), and a price for each item. Every time a price is entered add it to the SubTotal member of the order3 object. Once all of the info has been entered and assigned to the members of the object, call the UpdateTotal method with order3.SubTotal as the argument. Then call the DisplayOrder method of the order3 object.

If the user enters 'b' then ask the user if they wish to delete order 1 or order 2. The entered value should be assigned to the orderEdit variable. Use an if/else statement on the orderEdit variable to decide which of the orders to delete. You will not delete the order but set all of the order's string values to "", subtract the SubTotal amount from the static Total in the Order class, and then set the SubTotal amount of the order to 0.00. Call the DisplayOrder method on whichever order has been deleted.

If the user enters 'c' call the DisplayTotal method.

If the user enters 'd' print out "Leaving" to the console and set the endMenu variable to true.

The default of the switch should prompt the user to please try again.

The entire menu display and switch statement should be enclosed in a do/while statement that executes until the endMenu variable is set to true.

for C#

In: Computer Science

A certain Professor Amongus claims that the order in which a fixed set of ele- ments...

  1. A certain Professor Amongus claims that the order in which a fixed set of ele- ments is inserted into a binary search tree does not matter—the same tree results every time. Give a small example that proves Professor Amongus wrong.

In: Computer Science

case study Target Corp – Data Mining in Retail Target is a large retail chain that...

case study

Target Corp – Data Mining in Retail Target is a large retail chain that crunches data to develop insights that help target marketing and advertising campaigns. Target analysts managed to develop a pregnancy prediction score based on a customer's purchasing history of 25 products. In a widely publicized story, they figured out that a teenage girl was pregnant before her father did. The targeting can be quite successful and dramatic as this example published in the New York Times illustrates. About a year after Target created their pregnancy-prediction model, a man walked into a Target store and demanded to see the manager. He was clutching coupons that had been sent to his daughter and he was angry, according to an employee who participated in the conversation. “My daughter got this in the mail!” he said. “She’s still in high school, and you’re sending her coupons for baby clothes and cribs? Are you trying to encourage her to get pregnant?” The manager didn’t have any idea what the man was talking about. He looked at the mailer. Sure enough, it was addressed to the man’s daughter and contained advertisements for 70 maternity clothing, nursery furniture and pictures of smiling infants. The manager apologized and then called a few days later to apologize again. On the phone, though, the father was somewhat subdued. “I had a talk with my daughter,” he said. “It turns out there’s been some activities in my house I haven’t been completely aware of. I owe you an apology.” (Source: New York Times).

Answer for this questions is just below but its someone else work , can you help me with this similar answer for this question.i just gave you the hint how to do this .

Answer: As a Retailer or Target store manager, they have right to collect all the order value or purchase material information about customer. But the store keeper are predicting the future things by the analysing last twenty-five product that she bought from the store. It’s hard for parent to accept the pregnancy result of their teen-age and high school daughter so they can be angry. Because, their prediction cannot be sure all the time, they should concern with customer before making any future guesses and sending any coupons to the customer’s address. Things can be different like may she had bought all those materials to her pregnant friends, or may be she was gifting it to her baby nieces. So shopkeeper should concern about these thing before making any prediction.

In: Computer Science

discuss one of the services Windows offers. Give a quick description of the service, how to...

discuss one of the services Windows offers. Give a quick description of the service, how to configure and enable it, whether the system uses it all the time, or just when you turn it on, and what your opinion is of the service. Does it do everything it needs to do for the user? What about ease of use?

In: Computer Science

List and discuss categories of threats (at least 4) that information systems face.

List and discuss categories of threats (at least 4) that information systems face.

In: Computer Science

discusses stopping, starting and restarting services. How often should you, as the administrator of your machine,...

discusses stopping, starting and restarting services. How often should you, as the administrator of your machine, have to do that? Should the operating system handle these tasks? Should this all be automated? When changing the attribute of the service, how does it affect other services? Discuss this and any other facts about these tasks in your homework.

In: Computer Science

Programming Task 1: Please use the following framework to implement a class for partially filled arrays....

Programming Task 1:

Please use the following framework to implement a class for partially filled arrays.

class PartiallyFilledArray

{

     double[] content;          // content of the array

     int size;                  // actual size of the array

     // creating an array whose physical size is 100

     PartiallyFilledArray()

     {

           // your implementation

     }

     // creating an array whose physical size is given by maxSize

     PartiallyFilledArray(final int maxSize)

     {

           // your implementation

     }

     // insertion

     boolean insert(_____________________)

     {

           // your implementation

     }

     // deletion

     boolean delete(_____________________)

     {

           // your implementation

     }

     // displaying all elements

     void display()

     {

           // your implementation

     }

}

Programming Task 2:

Please use the above class to create an empty partially filled array whose maximum size is 2000. (1) Consecutively add 20 different random integer values ranging from -100 to 100 to the array and display the content. (2) Delete the first 3 elements and display the content. Notice that you should not directly use the internal data field of PartiallyFilledArray in your test code.

In: Computer Science

How does the cloud consumer interact with the appropriate systems to gain access to the required...

How does the cloud consumer interact with the appropriate systems to
gain access to the required services. What different portals help the
consumer to achieve this?

In: Computer Science

JAVA Using the java.util.Calendar class, create 3 dates and times. Write a method to identify and...

JAVA Using the java.util.Calendar class, create 3 dates and times. Write a method to identify and print out the oldest of the 3 timestamps. Likewise, create another method that prints out the most recent time.

In: Computer Science

Examine computer-assisted tools and techniques for the auditing process to examine effective controls. How do these...

Examine computer-assisted tools and techniques for the auditing process to examine effective controls. How do these tools help IT managers maintain systems operations? How do the tools and techniques support the internal and external auditing process?

In: Computer Science