程序运行网站:
https://www.jyshare.com/compile/10/
课堂任务:
You are developing a grade management system and need to determine whether a student has passed. Your task is to practice the if single-branch statement.Write a Java program named PassChecker that completes the following tasks in the main method:
Step 1: Create an int variable score with the value 75; Create an int variable passLine with the value 60. Step 2: Use an if single-branch statement to check whether score is greater than or equal to passLine. If the condition is true, output "Pass"
Step 3: Output in the following format:

课堂任务/课后作业::
You are developing a parking fee system and need to calculate the parking fee based on the parking duration. Your task is to practice the if single-branch statement.Write a Java program named ParkingFee that completes the following tasks in the main method:
Step 1:Create an int variable hours with the value 5 (parking hours); Create a double variable baseFee with the value 10.0 (base fee); Create a double variable extraFee with the value 0.0 (extra fee).
Step 2: If the parking time exceeds 3 hours, the excess portion is charged at 3.0 per hour;Use an if single-branch statement to calculate the extra fee;Hint: Extra fee = (hours - 3) * 3.0.
Step 3: Calculate the Total Fee = base fee + extra fee.
Step 4: Output in the following format:

请提交代码截图至问卷星https://v.wjx.cn/vm/hwwd7D6.aspx#