Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Version B Note to Student Once you have completed all the question requirements, copy your code to the answer box below the question box, then

Version B
Note to Student
Once you have completed all the question requirements, copy your code to the answer box below the question box, then save your project files in a folder, zip it and upload in the upload file box below the answer box.
Question-1
The National Energy Regulator of South Africa (NERSA) keeps annual statistics of the number of litres of fuel sold at fuel stations across the country. They have approached you as a Java developer to assist them in developing a program that they can use in their business operations. They have provided you with a file with a list of the litres of fuel sold in the respective nine provinces for the year 2019.
Source: Makura S.M (2021)
Question 1
Develop a Java application for NERSA. Your application should retrieve the fuel sales from the database then output the results back to System.out. Your application should consist of the following:
1.1 A database:
The database should be called nersa, and should have a table called provincial sales with the following table properties:
\table[[Field Name,Data Type (SQL)],[saleID,INT (Primary Key)(Auto increment))],[province,VARCHAR],[litres,BIGINT]]
You are allowed to use any Relational Database management software you are comfortable with. NERSA has given you the following information to populate the database:
\table[[saleID,province,litres],[1,Gauteng,4200000],[2,Western Cape,1900000],[3,KwaZulu-Natal,1800000],[4,Mpumalanga,950000],[5,Eastern Cape,940000],[6,North West,740000],[7,Free State,720000],[8,Limpopo,500000],[9,Northern Cape,90000]]
Figure 1- Structure of the Provincial Sales Table
Ensure that your program handles basic exceptions.
Also, ensure that the program repeatedly shows the menu until a point when Option 2 is selected which terminates the program. A goodbye message must be displayed as shown in Figure 2 below.
Figure 2-When Option 2 is selected
Source: Makura, S.M
Note: You will need to copy and paste the MySQL connector.jar file in the jre/lib/ext folder should you use MySQL as your databa
Figure 3 below shows the added products as seen from a MySQL database.
Figure 3- Products table as seen from the Checkers database
Please help me resolve this assignment. I really need help, I am writing tomorrow. Please resolve the all assignment. I really appreciate your help!
image text in transcribed

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

=+ Who has this information?

Answered: 1 week ago

Question

=+ How can this information be obtained from them?

Answered: 1 week ago

Question

=+3. Who is responsible for this project?

Answered: 1 week ago