Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me to complete this code? I'm stuck on completing this code pls. ASAP?!?!!!!!!!!!! Part 2: Mutual Fund InvestorTrack App (45 pts)

Can someone please help me to complete this code? I'm stuck on completing this code pls. ASAP?!?!!!!!!!!!!

Part 2: Mutual Fund InvestorTrack App (45 pts)

  • For the next part of your lab, you will use the Hash Table class you wrote above to improve upon the Mutual Fund InvestorTrack App that you created for the prior lab.
  • We will make updates to the MutualFund and MutualFundAccount classes, as well as add a new class name Customer
  • Using the starter code below, fill in the empty method bodies.
  • Some of these methods may be indentical to your prior lab methods, but some will be new and/or updated.
  • Note that you are not allowed to add any additional methods or member variables to these class (including no DecimalFormat member variables) or you will not receive credit for this part of the assignment
  • You may not make anyadditional import statements at the top of any of the below files

MutualFund.Java

import java.text.DecimalFormat;

@SuppressWarnings("unused")

public class MutualFund {

private final String fundName;

private final String ticker;

private double pricePerShare;

private double tradingFee;

/**CONSTRUCTORS*/

/**

* One arguement constructor,

* when only ticker is known

* @param ticker the ticker symbol

* sets fundName to "No name"

* and assigns 0 to pricePerShare

* and tradingFee

*/

public MutualFund(String ticker) {

this.fundName = "";

this.ticker = "";

}

/**

* One arguement constructor,

* when only name and ticker are known

* @param name the name of the fund

* @param ticker the ticker symbol

* sets fundName to "No name"

* and assigns 0 to pricePerShare

* and tradingFee

*/

public MutualFund(String name, String ticker) {

this.fundName = "";

this.ticker = "";

}

/**

* Multi-argument constructor when all

* MutualFund information is known

* @param fundName the name of the fund

* @param ticker the ticker symbol

* @param pricePerShare the price per share

* @param tradingFee the trading fee as a percent

*/

public MutualFund(String fundName, String ticker, double pricePerShare, double tradingFee) {

this.fundName = "";

this.ticker = "";

}

/**ACCESSORS*/

/**

* Accesses the name of the fund

* @return the fund name

*/

public String getFundName() {

return null;

}

/**

* Accesses the ticker symbol

* @return the ticker symbol

*/

public String getTicker() {

return null;

}

/**

* Accesses the price per share

* @return the price per share

*/

public double getPricePerShare() {

return 0.0;

}

/**

* Accesses the trading fee

* @return the trading fee

*/

public double getTradingFee() {

return 0.0;

}

/**MUTATORS*/

/**

* Updates the share price

* @param pricePerShare the new share price

*/

public void setPricePerShare(double pricePerShare) {

this.pricePerShare = pricePerShare;

}

/**

* Updates the trading fee

* @param tradingFee the new trading fee

*/

public void setTradingFee(double tradingFee) {

this.tradingFee = tradingFee;

}

/**ADDITIONAL OPERATIONS*/

@Override public String toString() {

return " " + fundName + " " + ticker + " " + "Share Price: $" + pricePerShare + " ";

}

/**

* Compares this MutualFund to

* another Object for equality

* You must use the formula presented

* in class for full credit (see Lesson 4)

* @param o another Object

* (MutualFund or otherwise)

* @return whether o is a MutualFund

* and has the same ticker as this MutualFund

*/

@Override public boolean equals(Object o) {

if (this == o) {

return true;

}

return false;

}

/**

* Returns a consistent hash code for

* each MutualFund by summing the Unicode values

* of each character in the key

* Key = ticker

* @return the hash code

*/

@Override public int hashCode() {

return -1;

}

}

Mutualfund.txt

Name

Ticker

Price Per Share

Fee (as a Percent, Not a Decimal, e.g. 0.05%)

Total Bond Market Index Admiral Shares

VBTLX

11.61

0.05

Intermediate-Term Investment-Grade

VFICX

10.64

.20

Mid-Cap Index Admiral Shares

VIMAX

230.09

0.05

Municipal Money Market

VMSXX

1.00

0.15

Total Stock Market Index Admiral Shares

VTSAX

86.49

.04

International Growth

VWIGX

44.20

.27

U.S. Growth

VWUSX

62.41

.39

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

Step: 3

blur-text-image

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions