Find the errors inside this file

Computer Science
Tutor: None Selected Time limit: 1 Day

// This program calculates tutition bills as credits times rate per credit hour

public class DebugThree4

{

   public static void main(String args[])

   {

      int myCredits = 13

      int yourCredits = 17

      double rate = 75.84

      System.out.println("My tuition:");

      tuitionBill(myCredits, rate);

      System.out.println("Your tuition:");

      tuitionBill(myCredits, rate);

   }

   public static void tuitionBill(double r)

   {

      System.out.println("Total due " + (r*c));

   }

}

Oct 5th, 2015

Thank you for the opportunity to help you with your question!

Your function needs an extra argument. Like this :


public static void tuitionBill(double r,double c)

   {

      System.out.println("Total due " + (r*c));

   }


This should make it work :)


Please let me know if you need any clarification. I'm always happy to answer your questions.
Oct 5th, 2015

ou have to end all your ineger declarations with ";" 

Here is the full code , just in case :

public class DebugThree4

{

  public static void main(String args[])

  {

  int myCredits = 13;

  int yourCredits = 17;

  double rate = 75.84;

  System.out.println("My tuition:");

  tuitionBill(myCredits, rate);

  System.out.println("Your tuition:");

  tuitionBill(myCredits, rate);

  }

  public static void tuitionBill(double r,double c)

  {

  System.out.println("Total due " + (r*c));

  }

}


Oct 5th, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Oct 5th, 2015
...
Oct 5th, 2015
Dec 8th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer