JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner read = new Scanner(System.in);
int totalIncome = read.nextInt();
int taxPercent = read.nextInt();
//creating an Income object
Income income = new Income();
income.totalIncome = totalIncome;
income.taxPercent = taxPercent;
income.CalculateNetRevenue();
System.out.println("Net revenue: " + income.getNetRevenue());
}
}
class Income{
public int totalIncome;
public int taxPercent;
//the net revenue is private
private int netRevenue;
//complete setter method
public void CalculateNetRevenue(int n, int m){
n = totalIncome;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run