Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java First, launch NetBeans and close any previous projects that may be open (at

ID: 3880381 • Letter: J

Question

Java

First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).

Then create a new Java application called "Mogul" (without the quotation marks) that will compute the profitability of a real estate investment over a 1-year period.

Request the following values from the user at the command line:

Cost of the property (assume that it is in dollars)

The inflation rate (e.g., 0.05 for an inflation rate of 5%)

Property appreciation rate (e.g., 0.10 for an appreciation rate of 10%)

Your program should output: "Your investment's net profit is $X." Where $X is the net profit.

Net profit for one year is calculated as: Net profit = (Value of property * Rate of appreciation) - (Value of property * Rate of inflation).

package mogul;

import java.util.Scanner;

public class Mogul {

    public static void main(String[] args) {
        System.out.println("Enter the property value");
        Scanner scanner= new Scanner (System.in);
            double propertyCost=scanner.nextDouble();
            double inflationRate=0.05;
            double apperciationRate=0.10;
            double netProfit;
        netProfit = (propertyCost * apperciationRate) - (propertyCost * inflationRate);
          
    }

i dont know what to do next

Help

Please and thank you

Explanation / Answer

There are some modifications required in your as to shape it as is directed in the question.

Source Code-

package mogul;

import java.util.Scanner;

class Mogul {

public static void main(String[] args) {

Scanner scanner=new Scanner(System.in);

System.out.println("Enter the property value");

double propertyCost=scanner.nextDouble();

System.out.println("Enter the inflation Rate Percentage");

double inflationRate=scanner.nextDouble(); //It also asks you to enter inflation Rate and appreciation rate.

inflationRate=inflationRate/100;//converting to double value

System.out.println("Enter the Appreciation RatePercentage");

double appreciationRate=scanner.nextDouble();

appreciationRate= appreciationRate/100; //converting to decimal value

double netProfit = (propertyCost * appreciationRate) - (propertyCost * inflationRate);

System.out.println("Your investment's net profit is $"+netProfit); //printing in the reuquired format

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote