Writes data from an array list to data basein proper format

Assignment Help Database Management System
Reference no: EM131527728

Lab Assignment- Database

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 basein 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. Anytime you add a stock, you must add it in BOTH places. Anytime 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.

Reference no: EM131527728

Questions Cloud

Examine the book-value balance sheet : Examine the following book-value balance sheet for University Products Inc. What is the market debt-to-value ratio of the firm?
Calculate the before-tax and after-tax IRR, and NPW : Calculate the before-tax and after-tax IRR, and NPW using manual solutions.
Determine the inventory cost by the average cost method : There are 11 units of the item in the physical inventory at December 31. The periodic inventory system is used. Determine the inventory cost.
Utility from consumption of tacos : 1. Suppose the utility from consumption of tacos (x) and pad thai (z) is. a. What are the demand functions (as a function of income and prices) for x and z?
Writes data from an array list to data basein proper format : Writes data from an array list to the data basein proper format. Add persistent data storage to your Week 5 Lab using the MySQL Database.
What is your dollar return for the past year : One year ago you bought Superior stock for $83.00 per share. What is your dollar return for the past year? What is the capital gains yield?
Develop a program that targets a younger audience : The United States military conducts annually cohort surveys in order to assess the effectiveness of previously instituted training and guidelines.
The elements of a hostile work environment harassment claim : What are the elements of a hostile work environment harassment claim? Can John potentially satisfy the elements of a hostile work environment harassment claim?
Supply curve from the total cost function : A firm has the following cost function: C = 30 - 14Q + Q2. Derive the firm's supply curve from the total cost function.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd