A local mutual fund company is in need of a java programmer


Programming Assignment: Create class domains in NetBeans and test them

Problem Scenario: A local mutual fund company is in need of a Java programmer to assist them with some of their needs. Various fund managers in the office take care of multiple stocks in the manager's fund.

The company needs to be able to track information about their fund managers and their stock trades.

For each FundManager, the office needs to know: Broker's license number (Unique String - three letters followed by five digits)

• Broker's first name (String)

• Broker's last name (String)

• Broker's department number (String of digits and a dash, formatted as "###-###")

• Broker's commission rate (double representing a percentage)

The mutual fund company has had issues with incorrect license numbers and department numbers, so they are requesting a way to be able to determine if the they are correct.

For each StockTrade, the stock broker's office wants to track: Stock symbol (Unique 3 or 4-char string, all uppercased)

• Stock price per share (double)

• Stock number of shares (int) NOTE: Only whole shares can be traded for this program

• Broker's license number (to match license number in FundManager)

• Whether trade is taxable (boolean)

The mutual fund company has also had issues with incorrect stock symbols, prices, and number of shares, so they are requesting a way to be able to determine if the they are correct.

Program Requirements: The assignment this week is to create and test some of the classes for the problem scenario above. These classes will be used to implement data structures in later assignments.

The program must follow the CS310 Coding Standards from Content section 1.9.

To set up a project directory for your program:

o Create a new project in NetBeans, and name it CS310 + last name (e.g. CS310Smith).

o Use the default Main Class name provided by NetBeans (e.g. cs310smith.CS310Smith). This will cause NetBeans to create a package for your source code files.

o NetBeans will create the default folders for the project.

o NetBeans will create the main method within the main class (e.g. CS310Smith.java)

You will create two additional classes in the same CS310 folder as the CS310.java file (click on the CS310 folder before selecting New File).

The additional classes are:

• a FundManager class

• a StockTrade class

These classes will be used for creating and manipulating the FundManager and StockTrade objects, and will not contain a main method. All class attributes/properties/data fields will be encapsulated within the objects, and therefore will be defined as private.

After you create the FundManager and StockTrade classes, use the tips provided in the NetBeans reader to generate the following methods for both classes:

- constructors, getters, and setters

- equals() - must compare ALL attribute values

- toString() - must include ALL attribute values

The FundManager and StockTrade classes should include two constructors each:

- an empty constructor

- a constructor that accepts all of the attributes of the class as parameters

While NetBeans can help you create the basic methods, you will also need to add additional data error checking methods, as follows:

Error checking methods defined within the FundManager class:

• Check the broker's license

o contains 3 letters followed by 5 digits within the String.

• Check the department number

o 7 chars long and contains a dash and digits in the correct places, and all of the first three digits are 1, 2, or 3

Error checking methods defined within the StockTrade class:

• Check the stock symbol

o is 3 or 4 uppercased alphabetic characters long

• Check the stock price

o is not over $1000.00 per share

• Check the number of shares

o is not over 100,000

All of these error checking methods will simply check the proper attribute and return a true or false. Use appropriate method names that reflect the true case for the returned value.

Information related to above question is enclosed below:

Attachment:- CS310-ProgAssn1.rar

Solution Preview :

Prepared by a verified Expert
JAVA Programming: A local mutual fund company is in need of a java programmer
Reference No:- TGS02625608

Now Priced at $70 (50% Discount)

Recommended (96%)

Rated (4.8/5)