강의소개
배웠으면 사용해야 합니다. 배우기만하고 사용하지 않으면 우리의 뇌는 억울해합니다. 서둘러서 배운 것을 활용해 나의 문제를 해결해봅시다.
강의1
강의2
소스코드
public class AccountingApp { public static void main(String[] args) { double valueOfSupply = 10000.0; double vatRate = 0.1; double expenseRate = 0.3; double vat = valueOfSupply * vatRate; double total = valueOfSupply + vat; double expense = valueOfSupply * expenseRate; double income = valueOfSupply - expense; double dividend1 = income * 0.5; double dividend2 = income * 0.3; double dividend3 = income * 0.2; System.out.println("Value of supply : " + valueOfSupply); System.out.println("VAT : " + vat); System.out.println("Total : " + total); System.out.println("Expense : " + expense); System.out.println("Income : " + income); System.out.println("Dividend 1 : " + dividend1); System.out.println("Dividend 2 : " + dividend2); System.out.println("Dividend 3 : " + dividend3); } }
강의3
강의4
소스코드
public class AccountingApp { public static void main(String[] args) { double valueOfSupply = Double.parseDouble(args[0]); double vatRate = 0.1; double expenseRate = 0.3; double vat = valueOfSupply * vatRate; double total = valueOfSupply + vat; double expense = valueOfSupply * expenseRate; double income = valueOfSupply - expense; double dividend1 = income * 0.5; double dividend2 = income * 0.3; double dividend3 = income * 0.2; System.out.println("Value of supply : " + valueOfSupply); System.out.println("VAT : " + vat); System.out.println("Total : " + total); System.out.println("Expense : " + expense); System.out.println("Income : " + income); System.out.println("Dividend 1 : " + dividend1); System.out.println("Dividend 2 : " + dividend2); System.out.println("Dividend 3 : " + dividend3); } }