Instructions The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. An example of the program is shown below: Enter credits for first student >> 18 Enter credits for second student >> 30 Total due for student #1 is $1365.1200000000001 Total due for student #2 is $2275.2000000000003   Task 1: The DebugThree4 class compiles without error.   Task 2: The computeTuitionBill() method computes and displays the correct tuition bill.   Task 3: The DebugThree4 program accepts user input and displays the correct output.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

Instructions

The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.

An example of the program is shown below:

Enter credits for first student >> 18 Enter credits for second student >> 30 Total due for student #1 is $1365.1200000000001 Total due for student #2 is $2275.2000000000003

 

Task 1: The DebugThree4 class compiles without error.

 

Task 2: The computeTuitionBill() method computes and displays the correct tuition bill.

 

Task 3: The DebugThree4 program accepts user input and displays the correct output.

 

a 4 9 4*
RUN AND DEBUG HUN
Ő
Open a file which can be debugged or run
Run and Debug
© {{{2}©× 1| c FOJOJOJOJO IC
https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423
To customize Run and Debug create a
launch json le
Show all automatic debug configurations
J DebugThree4java x
J DebugThree4java> DebugThread > main(String(1
1 // This program calculates tutition bills
andit houe
2
// as credits times rate per credit hour
3
public class DebugThree4 {
Run Debug
public static void main(String args[]) {
// Declare and initialize variables for number of credits and rate per credit hour
5
6
7
8
9
18
11
12
13
14
15
16
17 •
18
19
28
21
22
23
Codespaces: literate siffle template" ☺☺☺AO 201
25
26
int myCredits - 13;
int yourCredits 17;
double rate 75.84;
}
// Calculate and print the tuition bill for "my" credits
System.out.println(x:"My tuition:");
tuitionBill(myCredits, rate);
// Calculate and print the tuition bill for "your" credits
System.out.println(x:"Your tuition:");
tuitionBill(yourCredits, rate);
// Method to calculate tuition bill based on number of credits and rate per credit hour
public static void tuitionBill(int credits, double rate) {
// Multiply the number of credits by the rate per credit hour to get the total due
double totalDue credits rate;
// Print the total due
System.out.println("Total due "totalDue);
PROBLEMS QUIPUI DEBUG CONSOLE TERMINAL PORUS COMMENTS
bowan3225/5788957673423_jawa-programmúng-380-5d83Plac-c9c6-4288-9022-37336c529045/chapter3/d/student (template) $
S
8 Juve: Ready
student Codespaces: literate sniffle)
LACT
S
DRINK
¹9 ¶ © ‹ \ ¡ © C
java-programming-10e-5... 85
Ta
ROSA
Welcome
X
F Companion X
How to Use the Code Editor
1. Select the "Run Code" button to execute the program.
2. Select the "Calculate Grade" button to generate a score based on the completed tasks.
3. Continue to modify, run, and calculate your code until you are happy with the grade.
4. Select the "Submit" button to turn in the assignment to your instructor.
Instructions
The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem,
remove all syntax and coding errors, and run the program to ensure it works properly.
An example of the program is shown below:
Enter credits for first student >> 18
Enter credits for second student >> 30
Total due for student #1 is $1365.1280880808081
Total due for student #2 is $2275.2880808808083
X
Ⓒ‹a | C ‹l
Q
A
☆
Task 1: The Debug Threes class compiles without error.
Task 2: The computeTuitionBill() method computes and displays the correct tuition bill.
Your current grade is: 33.33%
(D
Task 3: The DebugThree4 program accepts user input and displays the correct output.
RUN CODE
CALCULATE GRADE
+
SUBMIT
0000
0
→
(
Q
0
▲
Layout US
S
buh+AX
Transcribed Image Text:a 4 9 4* RUN AND DEBUG HUN Ő Open a file which can be debugged or run Run and Debug © {{{2}©× 1| c FOJOJOJOJO IC https://literate-sniffle-x5wx9wg5x7w4fr5r.github.dev/?folder=/workspaces/9780357673423 To customize Run and Debug create a launch json le Show all automatic debug configurations J DebugThree4java x J DebugThree4java> DebugThread > main(String(1 1 // This program calculates tutition bills andit houe 2 // as credits times rate per credit hour 3 public class DebugThree4 { Run Debug public static void main(String args[]) { // Declare and initialize variables for number of credits and rate per credit hour 5 6 7 8 9 18 11 12 13 14 15 16 17 • 18 19 28 21 22 23 Codespaces: literate siffle template" ☺☺☺AO 201 25 26 int myCredits - 13; int yourCredits 17; double rate 75.84; } // Calculate and print the tuition bill for "my" credits System.out.println(x:"My tuition:"); tuitionBill(myCredits, rate); // Calculate and print the tuition bill for "your" credits System.out.println(x:"Your tuition:"); tuitionBill(yourCredits, rate); // Method to calculate tuition bill based on number of credits and rate per credit hour public static void tuitionBill(int credits, double rate) { // Multiply the number of credits by the rate per credit hour to get the total due double totalDue credits rate; // Print the total due System.out.println("Total due "totalDue); PROBLEMS QUIPUI DEBUG CONSOLE TERMINAL PORUS COMMENTS bowan3225/5788957673423_jawa-programmúng-380-5d83Plac-c9c6-4288-9022-37336c529045/chapter3/d/student (template) $ S 8 Juve: Ready student Codespaces: literate sniffle) LACT S DRINK ¹9 ¶ © ‹ \ ¡ © C java-programming-10e-5... 85 Ta ROSA Welcome X F Companion X How to Use the Code Editor 1. Select the "Run Code" button to execute the program. 2. Select the "Calculate Grade" button to generate a score based on the completed tasks. 3. Continue to modify, run, and calculate your code until you are happy with the grade. 4. Select the "Submit" button to turn in the assignment to your instructor. Instructions The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. An example of the program is shown below: Enter credits for first student >> 18 Enter credits for second student >> 30 Total due for student #1 is $1365.1280880808081 Total due for student #2 is $2275.2880808808083 X Ⓒ‹a | C ‹l Q A ☆ Task 1: The Debug Threes class compiles without error. Task 2: The computeTuitionBill() method computes and displays the correct tuition bill. Your current grade is: 33.33% (D Task 3: The DebugThree4 program accepts user input and displays the correct output. RUN CODE CALCULATE GRADE + SUBMIT 0000 0 → ( Q 0 ▲ Layout US S buh+AX
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education