Home / Expert Answers / Computer Science / the-program-use-to-design-this-program-is-c-in-visual-studio-and-sql-server-scenario-you-have-bee-pa784

(Solved): The program use to design this program is C# (in Visual Studio) and SQL Server Scenario You have bee ...



The program use to design this program is C# (in Visual Studio) and SQL Server

Scenario
You have been tasked to develop a program using Windows Forms App (.NET Framework) to be used in a coffee shop. The application will assist management with the following:
1. Keep track of all daily and monthly sales using a SQL database
2. Dailly, Monthly, and yearly backup of all sales for future use on a txt file
3. The customer order processing (Type of coffee, quantity, price, total)
For the interface design you are only allowed to use Tabs for Management and order module. You will need an extra window to validate the management request to save information to a txt file or to print sales information from the database. The graphical user interface of the application will look as follows:

 

1. Management
The management Tab will have several controls as shown on the GUI in Figure 1.1.
Among the controls you will have 3 Buttons (b1, b2, and b3). The user will have to select a specific period (date, month, or year) they want to save, print, or view information.

COFFEE SHOP
MANAGEMENT
b1
ORDER
b2
i ??
COFFEE SHOP SYSTEM
b3
Sale
Summary:
Saturday, J
Figure 1.1: Management Tab
Dailly
6/7

The b1 button is the Save to TXT file button. On b1 click a validation window will pop up to validate the access right of the user (refer to Figure 1.2). After validation (Username and password to be retrieved from the database and compare with the user input), b1 button should get information from the database and save it to a txt file named BackUpSale.txt based on the user selection specific period (date, month, or year).
• The b2 button is the print button. On b2 click the information displayed in the text box should be printed on a document. If there is no date in the text box, the user should be notified to first display information from the database and then print.
• The b3 is the display button. On b3 click a validation window will pop up to validate the access right of the user (refer to Figure 1.2). After validation (Username and password to be retrieved from the database and compare with the user input), b3 button should get information from the CoffeeShopeDB database, based on the user selection on a specific period (date, month, or year), and display information in the text box.

2. Validation

Figure 1.2 represents the validation window for the print and save to txt file button. This form will have a direct connection with the CoffeeShopeDB database and table ManagerTable.

VALIDATION
User Name:
Password:
0
Confirm
CLICK HERE TO REGISTER
Figure 1.2: Validation window for managers
I

3. Order

Figure 2.1 represents the order Tab. The following will work as follows: The user should be able to select the type of coffee, the quantity, and the size of the coffee. Again, the user should be able to select if the client wants the coffee with sugar or Milk then hit the button add to order. This process can be repeated several times until the user decide to hit the print button to finalize the order and save the information to the database CoffeeShopeDB in table SalesTable.

COFFEE SHOP
MANAGEMENT
Type of Coffee: Select
Select
Late
Capuccino
Americano
Espresso
| Machiato
Add to order
ORDER
L
COFFEE

The print button on the order Tab will display the order summary on the txt box, calculate the total each added order and the total of the bill, lastly save the transaction to the database CoffeeShopeDB in table SalesTable.

COFFEE SHOP
MANAGEMENT
Type of Coffee: Capuccino
Add to order
ORDER
COFFEE SHOP SYSTEM
Size:
Small
Medium
Large
?Sugar
Cream

SQL Database Structure

Use SQL to design a database named CoffeeShopeDB and add 3 Tables using the below information:
Table 1: ManagerTable

Id_Man (PK)
1
2
3
??
Username
IsaacL@CTU
LeratoP@CTU
AlfredM@CTU
Password
Ctu@2022
Ctu#2022
Ctu%2022

Table 2: SalesTable

Id_Sale (PK)
1
2
3
4
2
4
2
3
Quantity
Description Price
Late
18.00
36.00
Espresso
27.00
108.00
Americano 19.00
38.00
Cappucci

Table 3: CoffeePriceTable

Id_Coffee (PK) Coffee Type Small_Price Medium_Price Large_Price Id_Sale (FK)
8

1
2
3
4
5
Americano
19.00
Cappuccino 22.00
Espresso
25.00
Late
18.00
Macchiato
23.00
20.00
27.00
27.00
20.00
26.00
25.00
31.0

Program Requirements

1. The interface declares a method called TotalOrderSummary().

2. The base class will have the following:
a. Variables: Type of coffee, price, Size of coffee, quantity, and added ingredients.
b. Constructor: That initialize the declared variables
c. A virtual method called TotalOrderSummary () that calculate the total bill and return the amount.
d. Overload the TotalOrderSummary (). This method should return a string with the following values to be displayed in the order Summary txt box (Figure 2.1)

Quantity Description
quantity
Type of coffee, Size of coffee
and added ingredients.
Price
price
Total
TotalOrderSummary ()

3. A subclass named Manager that extends the base class and override
double TotalOrderSummary () and String TotalOrderSummary() and declares the following methods
DisplayInfos (int period) refers to Figure 1.1: Management Tab
SaveToTXT (int period) refers to Figure 1.1: Management Tab

4. A Class named MainWindow (GUI)
With an Object that access all method/s implemented in base class and subclass. The class should:
a. The main class should make use of Exception Handling
b. Receive all input for the GUI

c. Call all methods from the base class and subclass to display to relevant txt boxes, and save information to database and txt file.

THE PHOTO'S THAT YOU NEED TO USE IN THE DESIGN

Photo1

Photo2 is b2

Photo3 is b1

?

 

Photo4 is b3

???

COFFEE SHOP MANAGEMENT b1 ORDER b2 i ?? COFFEE SHOP SYSTEM b3 Sale Summary: Saturday, J Figure 1.1: Management Tab Dailly 6/7/2022 Monthly June 2022 Su Mo Tu We Th Fr Sa 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 X Yearly VALIDATION User Name: Password: 0 Confirm CLICK HERE TO REGISTER Figure 1.2: Validation window for managers I COFFEE SHOP MANAGEMENT Type of Coffee: Select Select Late Capuccino Americano Espresso | Machiato Add to order ORDER L COFFEE SHOP SYSTEM Print Size: Small Sugar Order Summar Saturday, Jun 04 2022,09:13:26 Qtity Figure 2.1: Order Tab Medium Cream DX Large Select Qtity |Description Price Total I COFFEE SHOP MANAGEMENT Type of Coffee: Capuccino Add to order ORDER COFFEE SHOP SYSTEM Size: Small Medium Large ?Sugar Cream Select Qtity Order Summar Select Qtity 1 Saturday, Jun 04 2022,09:13:26 2 Qtity |Description Price To 3 Print Figure 2.2: Order Tab DX 5 Id_Man (PK) 1 2 3 ?? Username IsaacL@CTU LeratoP@CTU AlfredM@CTU Password Ctu@2022 Ctu#2022 Ctu%2022 Id_Sale (PK) 1 2 3 4 2 4 2 3 Quantity Description Price Late 18.00 36.00 Espresso 27.00 108.00 Americano 19.00 38.00 Cappuccino 22.00 66.00 Total date 13/05/2022 14/05/2022 15/05/2022 16/05/2022 Id_Coffee (PK) Coffee Type Small_Price Medium_Price Large_Price Id_Sale (FK) 8 1 2 3 4 5 Americano 19.00 Cappuccino 22.00 Espresso 25.00 Late 18.00 Macchiato 23.00 20.00 27.00 27.00 20.00 26.00 25.00 31.00 30.00 22.00 35.00 1 2 3 4 5 Quantity Description quantity Type of coffee, Size of coffee and added ingredients. Price price Total TotalOrderSummary () ? ???


We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe