Question: 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

it should be written in Python 2.1. Write a class called RestaurantCheck.

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

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!