Question: Java Netbeans programming In a Panel: have a loan calculator that provides user with the gui to enter: principal amount (amount of the loan), the

Java Netbeans programming In a Panel: have a loan calculator that provides user with the gui to enter: principal amount (amount of the loan), the annual rate or interest rate in percent (as 3.5%) and the number of years (duration of the loan) compute the monthly payment as shown by the formula and display it in another control.

Rate = annual rate divided by 1200example if annual rate = 3.75% then rate = 3.75 / 1200 months = years * 12.

Add a class Stock

public class Stock

{

private string companyName;

private int numberOfShares; //current number of shares a customer owns

private decimal pricePerShare; //current price per share

Add constructor

Add getter properties

Add methods:

PurchaseShares(int numberOfShares): this method should update the

current number of shares

SellShares(int numberOfShares): this method also should update the

current number of shares

InvestementValue(): should return total value of the stock

(number of shares times price per share)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!