filmov
tv
GUI Input Output | Assignment 1 Problem 3 | Accept Employee ID and Salary

Показать описание
#JavaGUIInput #JavaGUIOutput
GUI Input Output Assignment 1 Problem 3
Like, Share, And Subscribe | Professor Saad Yousuf
--------------------------------------------------------------------------------------------------------------
/*
* Write a Java Program to accept from user the following data:
Employee ID, Employee Salary
Declare a constant STATE_TAX_RATE = 0.06
Calculate State Tax Amount based on employee's salary and STATE_TAX_RATE.
Display Employee ID, Employee Salary and Tax Amount.
*/
public class Assignment1Problem3 {
public static void main(String[] args) {
//declaration
String id;
double salary;
double taxAmt;
final double TAX_RATE = 0.06; //constant
//input
//calculation
taxAmt = salary * TAX_RATE;
//output
"\nTax Amount: $" + taxAmt);
}
}
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
/*
* Write a Java Program to accept from user the following data:
Employee ID, Employee Salary
Declare a constant STATE_TAX_RATE = 0.06
Calculate State Tax Amount based on employee's salary and STATE_TAX_RATE.
Display Employee ID, Employee Salary and Tax Amount.
*/
public class Assignment1Problem3B {
public static void main(String[] args) {
//declaration
String id;
double salary;
double taxAmt;
final double TAX_RATE = 0.06; //constant
//input
salary =
//calculation
taxAmt = salary * TAX_RATE;
//output
"\nTax Amount: $" + taxAmt);
}
}
---------------------------------------------------------------------------------------------------------
GUI Input Output Assignment 1 Problem 3
Like, Share, And Subscribe | Professor Saad Yousuf
--------------------------------------------------------------------------------------------------------------
/*
* Write a Java Program to accept from user the following data:
Employee ID, Employee Salary
Declare a constant STATE_TAX_RATE = 0.06
Calculate State Tax Amount based on employee's salary and STATE_TAX_RATE.
Display Employee ID, Employee Salary and Tax Amount.
*/
public class Assignment1Problem3 {
public static void main(String[] args) {
//declaration
String id;
double salary;
double taxAmt;
final double TAX_RATE = 0.06; //constant
//input
//calculation
taxAmt = salary * TAX_RATE;
//output
"\nTax Amount: $" + taxAmt);
}
}
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
/*
* Write a Java Program to accept from user the following data:
Employee ID, Employee Salary
Declare a constant STATE_TAX_RATE = 0.06
Calculate State Tax Amount based on employee's salary and STATE_TAX_RATE.
Display Employee ID, Employee Salary and Tax Amount.
*/
public class Assignment1Problem3B {
public static void main(String[] args) {
//declaration
String id;
double salary;
double taxAmt;
final double TAX_RATE = 0.06; //constant
//input
salary =
//calculation
taxAmt = salary * TAX_RATE;
//output
"\nTax Amount: $" + taxAmt);
}
}
---------------------------------------------------------------------------------------------------------
Комментарии