Create class domains in NetBeans and test them

Assignment Help JAVA Programming
Reference no: EM131830103

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

Reference no: EM131830103

Questions Cloud

What is the maximum amount of these expenditures : Employee Payroll $12,000, Utilities $2,000. What is the maximum amount of these expenditures that Egret can deduct in 2011
Sum of the cross products : Two variables, Variable X and Variable Y, are the focus of a study. The study involves 25 research participants. The sum of the cross products
Apply the results to valuing firm both unlevered-levered : The supplemental materials describe the process of calculating WACC and go on to apply the results to valuing a firm both unlevered (no debt) and levered (debt)
Week and their grade point averages : Assume you've collected information from 6 students as to how many hours they work each week and their grade point averages (GPAs).
Create class domains in NetBeans and test them : 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.
Calculate the comparative cost of each of the three payment : Using the net present value method, calculate the comparative cost of each of the three payment plans being considered by New Bio
Percentage of debt in market value capital structue : Calculate the percentage of debt in HSB's market value capital structure. Calculate the DCF (dividend growth model) required return on HSB common stock.
Determine the bonds issue price on january : Required - For each of the following three seperate situations, (a) determine the bonds' issue price on January 1, 2011
Predict the amount of expenditure for someone : Assume you've collected information from customers at a local bookstore. More specifically, for 10 customers, you have the following information

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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