This is a program to create an Invoice Calculator application; the user inputs the subtotal and the application will calculate the invoice and, display the discount percent and discount amount.
- if the subtotal is more than or equal to 200, the discount percent is 20%
- if the subtotal is less than 200 and more than or equal to 100, discount percent is 10%
- if the subtotal less than 100, discount percent is 0%
The problem...
User Profile
Collapse
-
GUI & event driven programing
-
Int and Boolean
How do I use an int variable as a boolean.
Code:private int choose; System.out.println("Do you wish to apply for the loan \n1 Yes n\2 No"); choose = scanner.nextInt(); if (choose = 1) System.out.println("You have applied for the loan"); else System.out.println("Your application have been cancelled."); -
Simple Sign in Application
This is a basic sign in application I created. Currently I'm studying Java Programming and doing this to practice for a future assignment. Please comment whether if my code is okay or if it needs improvement; and if it needs to be improved how do I do it.
...Code:import java.util.*; class LogIn { Scanner key = new Scanner (System.in); private String username = "Kate", password = "abc789";
No activity results to display
Show More