Question: import java.util.Scanner; public class Employee { public static void main(String[] args) { 1 1 Scanner sc - new Scanner (System.in); 1/Declaring variables String name; double

import java.util.Scanner; public class Employee { public static void main(String[] args) { 1 1 Scanner sc - new Scanner (System.in); 1/Declaring variables String name; double salary; double paid; double moneyBalance; System.out.println("Welcome"); //assigning salary - 8000.78f; paid = 0; moneyBalance 20000f; Xa Integer *f floating point numbers Xs String C that Un nevine flag, width, precision points, specifier width: Ihount of char 2 how many decimal places after the point d, t, so X-20.26 left justified, 2e characters, 2 decimal points 1/System.out.print(); *7 System.out.println("Enter name: "); name - sc.next(); //waits for the user to enter input System.out.printf("Hello, xs, preparing profile.., Inbalance: %.2f, name, moneyBalance); arch 1/ Modify this Employee class so that the program displays 11 all the user's information in a well formatted way //and asks the user for the amount to pay to this employee //then adds this amount to the the paid and the moneyBalance //Display the updated information at the end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
