Find the errors inside this file

label Computer Science
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

// 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

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Oct 5th, 2015
...
Oct 5th, 2015
Oct 17th, 2017
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