Placeholder

CIS355A Week 6 Lab Database Stocks4U Portfolio Management System

$15.00

Description

OBJECTIVES
Add persistent data storage to your Week 5 Lab using the MySQL Database.
PROBLEM: Stocks4U Portfolio Management System
The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a MySql Database.
FUNCTIONAL REQUIREMENTS
The functional requirements of the Stocks4U application have not changed, and the Graphical User Interface has not changed from Week 5.
StockIO class
Modify the StockIO class to read and write the stock information to and from a MySQL database. Called “StocksDB”
This class should have two methods.
getData—reads data from file, returns data in array list of stock objects
saveData—writes data from an array list to the data base in proper format
deleteStock—deletes the identified stock from the database
updateStock—updates the identified stock in the database.
The database connection string will be stored as a constant in the StockIO class.
GUI class
Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Any time you add a stock, you must add it in BOTH places. Any time you remove a stock, you must remove it in BOTH places.
File—open should open the database, retrieve the existing records and display the existing records.
File—save should save all records, new and old, back to the database.
File—exit should exit the program.
The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.
CODE STYLE REQUIREMENTS
Include meaningful comments throughout your code.
Use meaningful names for variables.
Code must be properly indented.
Include a comment header at beginning of each file, example below.
/****************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************/
DELIVERABLES
Submit as a SINGLE zip folder
all Java files; and
the Lab report.
Follow assignment specification regarding class/method names.
Note that your Java file name must match class name (DO NOT rename).
SCREENSHOTS
SOLUTION
PAYMENT
The solution includes a zip file.
Attachments [Move over files to preview content of those files]
CIS355A_Week_6_Lab.zip (1.46 MB)
CIS355A-Week-6-Lab-Screenshot.jpg
cis355a_lab_6_report.docx
java code
Stock.java
StockGUI.java
StockIO.java
Netbeans project
CIS355AWeek6Lab
build
classes
.netbeans_automatic_build
.netbeans_update_resources
Stock.class
StockGUI.class
StockIO.class
build.xml
libs
com.mysql.jdbc_5.1.5.jar
manifest.mf
nbproject
build-impl.xml
genfiles.properties
private
config.properties
private.properties
project.properties
project.xml
src
Stock.java
StockGUI.java
StockIO.java
test
Preview Stock.java
}
xxxxxx xxxxx(xxxxxx[] x) {
xxx {
setCompanyName(s[0]); setNumberShares(Integer.parseInt(s[1].trim())); setPurchasePrice(Double.parseDouble(s[2].trim())); setCurrentPrice(Double.parseDouble(s[3].trim())); } catch (Exception e) { throw e; } }
public Stock(String sName, int nShares, double pPrice, double cPrice) { setCompanyName(sName); setNumberShares(nShares);
xxxxxxxxxxxxxxxx(xxxxxx);
xxxxxxxxxxxxxxx(xxxxxx);
}
xxxxxx xxxx xxxxxxxxxxxxxx(xxxxxx xxxxx) {
xxxx.xxxxxxxxxxx = xxxxx;
Preview StockGUI.java
xxxxxx xxxxxxxx() {
xxxxxxxxxxxxxx();
xxxxxxxx = xxx xxxxxxx();
xxxxxxxxxxxx.xxxxxxxx(xxx xxxxxxxxxxxxxxxx());
}

@SuppressWarnings(“unchecked”)
//
//GEN-BEGIN:initComponents
private void initComponents() {

jTextField1 = new javax.swing.JTextField();
tabbedPane = new javax.swing.JTabbedPane();
listTab = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
stockListGUI = new javax.swing.JList<>();
stockInfo = new javax.swing.JLabel();
xxxxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxxx();
xxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxxxxxx();
xxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
Preview StockIO.java
xxxxxx xxxxx xxxxxxx {
xxxxxx xxxxx xxxxxx xxxx_xxxxxx = “xxx.xxxxx.xxxx.xxxxxx”;
xxxxxx xxxxx xxxxxx xx_xxx = “xxxx:xxxxx://xxxxx.xxxxx.xxx:4300/xxx355x_3210”; // xxxxxxx xxx355x_3210 xx xxxx xxxxxxxx xxxx
// Database credentials static final String USER = “3210”; // your user name static final String PASS = “1234567890”; // your password private static ArrayList
dbBackup = new ArrayList
();
public StockIO() { dbBackup = new ArrayList
(); }
public ArrayList
getData() throws Exception { Connection conn = null;
xxxxxxxxx xxxx = xxxx;
xxxxxxxxx
xxxx = xxx xxxxxxxxx
();
xxx {
//xxxx 2: xxxxxxxx xxxx xxxxxx
xxxxx.xxxxxxx(“xxx.xxxxx.xxxx.xxxxxx”);
Preview Stock.java
}
xxxxxx xxxxx(xxxxxx[] x) {
xxx {
setCompanyName(s[0]); setNumberShares(Integer.parseInt(s[1].trim())); setPurchasePrice(Double.parseDouble(s[2].trim())); setCurrentPrice(Double.parseDouble(s[3].trim())); } catch (Exception e) { throw e; } }
public Stock(String sName, int nShares, double pPrice, double cPrice) { setCompanyName(sName); setNumberShares(nShares);
xxxxxxxxxxxxxxxx(xxxxxx);
xxxxxxxxxxxxxxx(xxxxxx);
}
xxxxxx xxxx xxxxxxxxxxxxxx(xxxxxx xxxxx) {
xxxx.xxxxxxxxxxx = xxxxx;
Preview StockGUI.java
xxxxxx xxxxxxxx() {
xxxxxxxxxxxxxx();
xxxxxxxx = xxx xxxxxxx();
xxxxxxxxxxxx.xxxxxxxx(xxx xxxxxxxxxxxxxxxx());
}

@SuppressWarnings(“unchecked”)
//
//GEN-BEGIN:initComponents
private void initComponents() {

jTextField1 = new javax.swing.JTextField();
tabbedPane = new javax.swing.JTabbedPane();
listTab = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
stockListGUI = new javax.swing.JList<>();
stockInfo = new javax.swing.JLabel();
xxxxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxxx();
xxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
xxxxxxxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxxxxxx();
xxxxxxxxxxxxx = xxx xxxxx.xxxxx.xxxxxx();
Preview StockIO.java
xxxxxx xxxxx xxxxxxx {
xxxxxx xxxxx xxxxxx xxxx_xxxxxx = “xxx.xxxxx.xxxx.xxxxxx”;
xxxxxx xxxxx xxxxxx xx_xxx = “xxxx:xxxxx://xxxxx.xxxxx.xxx:4300/xxx355x_3210”; // xxxxxxx xxx355x_3210 xx xxxx xxxxxxxx xxxx
// Database credentials static final String USER = “3210”; // your user name static final String PASS = “1234567890”; // your password private static ArrayList
dbBackup = new ArrayList
();
public StockIO() { dbBackup = new ArrayList
(); }
public ArrayList
getData() throws Exception { Connection conn = null;
xxxxxxxxx xxxx = xxxx;
xxxxxxxxx
xxxx = xxx xxxxxxxxx
();
xxx {
//xxxx 2: xxxxxxxx xxxx xxxxxx
xxxxx.xxxxxxx(“xxx.xxxxx.xxxx.xxxxxx”);
Price: $15
Buy Now
Checkout
Added to cart
Buy More Save More
Buy at least TWO items & save up to 30% OFF your ENTIRE order!
Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up.
Discounts will automatically be applied on eligible orders.
CIS355A Week 6 Lab Database Stocks4U Portfolio Management System – $19.00
CIS355A Week 7 Course Project Flooring Application User Manual and Application Code – $25.00
Add to Cart
Checkout
Added to cart
You May Also Like:
CIS355A Final Exam Essay Questions
CIS355A Week 1 Lab Developing an OOP Console Application
CIS355A Week 2 Lab Developing a GUI Application
CIS355A Week 3 Lab BurgersRUs Point of Sale system
CIS355A Week 4 Course Project Flooring Application Analysis and Design
CIS355A Week 4 Lab Stocks4U Portfolio Management System
CIS355A Week 5 Lab File Processing Stocks4U Portfolio Management System
CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.