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.
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.
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.
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.
SQL Database Structure
Use SQL to design a database named CoffeeShopeDB and add 3
Tables using the below information:
Table 1: ManagerTable
Table 2: SalesTable
Table 3: CoffeePriceTable
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)
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