Develop a Java application that should make use of Remote Method Invocation and a database. Your application should retrieve the fuel sales from the database then output the results in a graphical user interface. Your application should consist of the following:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Develop a Java application that should make use of Remote Method Invocation and a database. Your application should retrieve the fuel sales from the database then output the results in a graphical user interface. Your application should consist of the following:

a) - A database:

ï The database should be called Sells, and should have a table called provincialsales with the following table properties: saleID INT (Primary key), province(varchar), litres BIGINT

ï You are allowed to use any RDMS you are comfortable with.

b) - A Province class:

ï The province class should implement the serializable interface and have getter and setter methods to get entries from the database

c) - A remote object interface:

ï The remote interface should be called Sales. It should have a method that returns a list that comprises of objects from the Province class.

d) - A ConnectionImpl class:

ï The class should be called ConnectionImpl and should implement the Sales interface.

ï It should have a method to get the all provincial sales from the database and populate them to an ArrayList using the method defined in the Sales interface.

ï The method should connect to the database and retrieve all the information in the provincialsales table using the methods in the Province class.

ï The method should create an instance of the Province class were the values from the database are set. Afterward, these should be added to the ArrayList.

e) - A Server class:

ï It should extend the ConnectionImpl class and instantiate an instance of the ConnectionImpl class.

ï It should export the remote object from the ConnectionImpl class to stub and bind the remote object in the registry. (Hint: Use the UnicastRemoteObject class)

ï When the server class is running, it should output the message ìServer is readyî to System.

f) - A Client class:

ï The client class should locate a remote object from the RMI register and invoke the method from the ConnectionImpl class in order to retrieve provincialsales details added to the ArrayList.

ï Should have a method to iterate through the entire list and output the details into a JTable

ï Should have a method to iterate through the entire list and output the details into a JTable. Hint - make use of the methods in the Province class to get these details.

the results displayed in a JTable after running the application

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education