Study the scenario and complete the question(s) that follow: Checkers is a retail company with many shops across South Africa’s nine provinces. They would like an application that they can use for stock taking of the products they sell. They have approached you as an experienced Java developer to aid them in developing an application they can use at their warehouses when they receive stock of new products. The application should implement a client server architecture where the server acts as the back end between the client and the database. The application should allow the user to enter product details on the client side, and the server side should receive these details and store them in a database. Create a Java application for Checkers called CheckersStockTakingApp. The application should consist of a client side, a server side and a database. Question Create a database called checkersproducts using MySQL or any relational database management software you are comfortable with. The database should have a table called products that consists of the following columns and properties: prodID AUTO NUMBER (primary) prodName VARCHAR (30) prodType VARCHAR (30) prodPrice DECIMAL (6,2) Also Create a server class that will do the following: • Run on port 8000 and listen to a client • Initially output a “server is starting” message to the screen • Make a connection to the database • Receive product details from the client • Add product details to products table • Send a message back to client to inform whether or not the product was added • Handle any exceptions • Close the server when the user types "stop" on the client side and output a message "Server stopping...." (see Figure 6 attached) Also Create a client class that will do the following: • Create a socket to connect to the server using port 8000 • Initially show a welcome message (see Figure 5 attached) • Prompt the user to enter product name, type and price • Send product details to server • Receive response from server to indicate whether product has been added to database or not • Allow user to add more products • Close the client when the user types “stop” for the product name and output a message “Exiting Checkers Stock Taking App, Good bye

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Study the scenario and complete the question(s) that follow:

Checkers is a retail company with many shops across South Africa’s nine provinces. They would like an application that they can use for stock taking of the products they sell. They have approached you as an experienced Java developer to aid them in developing an application they can use at their warehouses when they receive stock of new products. The application should implement a client server architecture where the server acts as the back end between the client and the database. The application should allow the user to enter product details on the client side, and the server side should receive these details and store them in a database.

Create a Java application for Checkers called CheckersStockTakingApp. The application
should consist of a client side, a server side and a database.
Question Create a database called checkersproducts using MySQL or any relational database management software you are comfortable with. The database should have a table called products that consists of the following columns and properties:

prodID AUTO NUMBER (primary)
prodName VARCHAR (30)
prodType VARCHAR (30)
prodPrice DECIMAL (6,2)

Also Create a server class that will do the following:
• Run on port 8000 and listen to a client
• Initially output a “server is starting” message to the screen
• Make a connection to the database
• Receive product details from the client
• Add product details to products table
• Send a message back to client to inform whether or not the product was added
• Handle any exceptions
• Close the server when the user types "stop" on the client side and output a message
"Server stopping...." (see Figure 6 attached)

Also Create a client class that will do the following:
• Create a socket to connect to the server using port 8000
• Initially show a welcome message (see Figure 5 attached)
• Prompt the user to enter product name, type and price
• Send product details to server
• Receive response from server to indicate whether product has been added to database
or not
• Allow user to add more products
• Close the client when the user types “stop” for the product name and output a message
“Exiting Checkers Stock Taking App, Good bye!"

Output x
D CheckersStockTakingApp (run) x ChedckersStockTakingApp (run) #2 x
run:
Server is starting....
Server received Product Details: Albany White Bread Bread 17.99
Connected to the database checkersproducts
Product has been added to database
Server received Product Details: 2kg Whole Chicken Meat 56.50
Connected to the database checkersproducts
Product has been added to database
Server received Product Details: Kellogs Cornflakes Cereal 45.70
Connected to the database checkersproducts
Product has been added to database
Server received Product Details: lkg Banana Fruit 16.50
Connected to the database checkersproducts
Product has been added to database
Server stopping...-
BUILD SUCCESSFUL (total time: 1 minute 47 seconds)
Figure 6 - Server-side messages
Transcribed Image Text:Output x D CheckersStockTakingApp (run) x ChedckersStockTakingApp (run) #2 x run: Server is starting.... Server received Product Details: Albany White Bread Bread 17.99 Connected to the database checkersproducts Product has been added to database Server received Product Details: 2kg Whole Chicken Meat 56.50 Connected to the database checkersproducts Product has been added to database Server received Product Details: Kellogs Cornflakes Cereal 45.70 Connected to the database checkersproducts Product has been added to database Server received Product Details: lkg Banana Fruit 16.50 Connected to the database checkersproducts Product has been added to database Server stopping...- BUILD SUCCESSFUL (total time: 1 minute 47 seconds) Figure 6 - Server-side messages
Output X
W CheckersStockTakingApp (run) x CheckersStockTakingApp (run) #2 x
Welcome to Checkers Stock Taking App
Enter Product Name:
Albany White Bread
Enter Product Type:
Bread
Enter Product Price:
17.99
Server says: Product has been added
Enter Product Name:
2kg Whole Chicken
Enter Product Type:
Meat
Enter Product Price:
56.50
Server says: Product has been added
Enter Product Name:
Kellogs Cornflakes
Enter Product Type:
Cereal
Enter Product Price:
45.70
Server says: Product has been added
Enter Product Name:
1kg Banana
Enter Product Type:
Fruit
Enter Product Price:
16.50
Server says: Product has been added
Enter Product Name:
stop
Exiting Checkers Stock Taking App, Good bye!
BUILD SUCCESSFUL (total time: 1 minute 43 seconds)
Transcribed Image Text:Output X W CheckersStockTakingApp (run) x CheckersStockTakingApp (run) #2 x Welcome to Checkers Stock Taking App Enter Product Name: Albany White Bread Enter Product Type: Bread Enter Product Price: 17.99 Server says: Product has been added Enter Product Name: 2kg Whole Chicken Enter Product Type: Meat Enter Product Price: 56.50 Server says: Product has been added Enter Product Name: Kellogs Cornflakes Enter Product Type: Cereal Enter Product Price: 45.70 Server says: Product has been added Enter Product Name: 1kg Banana Enter Product Type: Fruit Enter Product Price: 16.50 Server says: Product has been added Enter Product Name: stop Exiting Checkers Stock Taking App, Good bye! BUILD SUCCESSFUL (total time: 1 minute 43 seconds)
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY