Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

it should be written in Python 2.1. Write a class called RestaurantCheck. It should have the following: Fields called check_number, sales_tax_percent, subtotal, table_number, and server_name

it should be written in Python

image text in transcribed

2.1. Write a class called RestaurantCheck. It should have the following: Fields called check_number, sales_tax_percent, subtotal, table_number, and server_name representing an identification for the check, the bill without tax added, the sales tax percentage, the table number, and the name of the server. A constructor that sets the values of all four fields A method called calculate_total that takes no arguments (besides self) and returns the total bill including sales tax. A method called print_check that writes to a file called check###.txt, where ### is the check number and writes information about the check to that file, formatted like below: Check Number: 443 Sales tax: 6.0% Subtotal: $23.14 Total: $24.53 Table Number: 17 Server: Sonic the Hedgehog Test the class by creating a RestaurantCheck object and calling the print_check() method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

Explain three ways that sales employees are typically compensated.

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago