Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA PLEASE!!!!!!!!!! Stock Portfolio Application Assignment Requirements Please read through the entire project requirements and use case to understand the project requirement. You will

IN JAVA PLEASE!!!!!!!!!!

Stock Portfolio Application

Assignment Requirements

Please read through the entire project requirements and use case to understand the project requirement.

You will be using the IDE installed in week1 to create this application. You will be applying some of the concepts you have learnt during this course to build a real application. You must be able to do research to build this solution if required.

You will be building a Stock Portfolio Application that allows you to do transactions like buying and selling stocks and ability to deposit and withdraw cash from your brokerage account.

You will create a TransactionHistory class with the following attributes (25 points):

Private field

Purpose of this field

String ticker

Will store ticker of the Stock or CASH

String transDate

Date when the transaction occurred

String transType

Type of transaction BUY/SELL for stock, DEPOSIT/WITHDRAW for CASH

double qty

Quantity for the transaction

double costBasis

Cost Basis of stock. For CASH this will be 1.00

Create the

constructor Default and Overloaded constructor

Getter and Setter methods for all the attributes.

You will create another class called PortfolioManager that will have the main method to test the application. This will have the following attributes

Private field

Purpose of this field

ArrayList portfolioList = new ArrayList();

ArrayList to store any number of TransactionHistory records

You will create a menu for user to enter different types of transactions such as

DEPOSIT Cash

WITHDRAW Cash

BUY Stock

SELL stock

Create a menu as shown below to do the different types of transactions and display Transaction History and Portfolio Information.

Brokerage Account

0 - Exit

1 - Deposit Cash

2 - Withdraw Cash

3 - Buy Stock

4 - Sell Stock

5 - Display Transaction History

6 - Display Portfolio

Enter option (0 to 6):

Things to consider:

Make sure to put header comments for each of the java file.

Make sure that you get an error message when invalid input is entered from the menu.

Four Transaction Type BUY, SELL, DEPOSIT, WITHDRAW

Make cost basis for CASH transaction as 1.00.

The CASH transactions are automatically created while buying or selling stock.

When CASH is withdrawn, qty is negative and when deposited qty is positive

Make sure to check if you have enough CASH in the bank to purchase stock.

Withdrawl amount cannot be more than the CASH available in the account (Give an error message).

When buying or sell stocks, create two transactions, the stock is purchased or sold, and other transaction of CASH withdrawn or deposited in the account.

Hint:

Use ArrayList to create Transaction History.

Loop through the transaction history ArrayList to generate the Portfolio information

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_2

Step: 3

blur-text-image_3

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

Optimizing Data Collection In Warzones

Authors: Aaget Aamber

1st Edition

B0CQRRFP5F, 979-8869065902

More Books

Students also viewed these Databases questions

Question

List operations to be performed on directories?

Answered: 1 week ago

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago