Answer:
import java.util.Scanner;
public class WeeklySalary {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Hourly wage");
double hourlyWage = in.nextDouble();
System.out.println("Enter total hours worked in the week");
int hoursWorked = in.nextInt();
int overtime = hoursWorked - 40;
double weeklyWage = 40*hourlyWage;
System.out.println("Total Over Time Hours is: "+overtime);
double overTimeWage = overtime*(hourlyWage*1.5);
System.out.println("Wage for full time: "+ weeklyWage);
System.out.println("Wage for over time: "+ overTimeWage);
}
}
Explanation:
- Using Java programming language
- Import the Scanner class to receive user input
- prompt user for hourly wage rate, receive and save in a variable
- Prompt user for total hours worked for the week receive and save in a variable
- calculate overtime hours by subtracting 4 from total hours worked in the week
- Calculate weekly wage by multiplying hourly rate by 40
- Calculate overtime by multiplying overtime hours by (hourlyWage*1.5).
- See attached sample run of the code
Answer:
Server side web caching typically involves utilizing a web proxy which retains web responses from the web servers it sits in front of, effectively reducing their load and latency.
Explanation:
It's a scam don't buy something
The only syntax error I saw was that the re pattern should have been double quoted.
Other
non-syntax errors are: the import statement doesn't have a valid module
name. It should be "import re" . Since tutorGroup is double quoted in
the re.match(), it becomes a string, not the variable from the input()
function.
Answer:
The following are the code in the Java Programming Language.
//set the for loop
for (k = 0; k < nMembers; k++)
{
//check that currentMembers[k] is equal to the memberID
if (currentMembers[k] == memberID)
{
//then, initialize isAMember to true
isAMember = true;
//and initialize the value of nMembers in k
k = nMembers;
}
//otherwise
else
{
//initialize isAMember to false
isAMember = false;
}
}
Explanation:
<u>The following are the description of the program</u>.
- Set the for loop statement that iterates from 0 and stops at the variable 'nMembers'.
- Set the if conditional statement that checks the variable 'currentMembers[k]' is equal to the variable 'memberID' then, initialize 'true' boolean value in the variable 'isAMember' and also initialize the value of the variable 'nMembers' in the variable 'k'.
- Otherwise, initialize 'false' boolean value in the variable 'isAMember'.