Question
**Create a program in Java that suports these requirements. Input user information (unique ID, first and last name, password, and if an admin or not.
**Create a program in Java that suports these requirements. Input user information (unique ID, first and last name, password, and if an admin or not. As well as what stocks the user has and how many.) Separate class for stocks to provide stocks for users to obtain and check on. Output will display the users information and stocks associated with the user.**
An application is needed to provide access for a stock-tracking application under construction for client, Stock Market Trading. The GUI (Graphical User Interface) application allows users to track their own customized account list of stock holdings. As the GUI will change over time, a program must be available that will provide database access independent of the GUI.
User data consists of an ID, firstname, lastname, password, and an indicator for an administrative or non-administrative user. User IDs must be unique and used to access user data. Given a User object, the program can add, update, or delete the user data in the database. Given a user ID, the program can return the User object. The program can return from the database/array a list of all user IDs, the first and last names of each, and whether or not each is an administrator.
For each stock, one stock symbol and one corresponding description exists. The description is the name of the stock. The symbol is the unique access to stock data. The program can add a stock given a symbol and a description. The program can delete a stock for an existing stock symbol. The program can provide a stock description (name) given an existing stock symbol.
The program maintains the relationship between users and stocks. One user can have zero to many stocks, and one stock can have one to many users. Stocks held by at least one user are retained in the database/array. If a stock is removed from a users holdings and no other user holds that stock, the stock and its description are removed from the database/array. If a user is deleted from the system, all stock holdings for the user must be deleted. Users cannot delete a stock, only their stock holdings.
Given a user ID, the program can provide a list of stocks held by the user. The program can add or delete a stock holding given a user ID and stock symbol.
A utility program should create the database structure and one administrative user entry in the database. This user entry will be used for the initial user log on so that additional users may be added by the application. Subsequent executions should restore the database to its initial state.
Your project MUST include, but is not limited to the following:
Abstract Classes
Database Connectivity
Use of Arrays
Menu Driven
Servlets
Create/Write/Update data to a sequential file
Manipulation of data by changing stock price, yield, number of shares, etc.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started