1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
andrezito [222]
3 years ago
10

// This class calculates a waitperson's tip as 15% of the bill public class DebugThree1 { public static void main(String args[])

{ double myCheck = 50.00; double yourCheck = 19.95; System.out.println("Tips are"); calcTip(myCheck); calctip(yourCheck); } public static int calcTip(int bill) { final double RATE = 0.15; tip = bill + RATE; System.out.println("The tip should be at least " + tip); } }
Computers and Technology
1 answer:
DENIUS [597]3 years ago
4 0

I added a decimal format to keep all decimals within the hundredths place. I also changed the calcTip method to void and the argument to a double. Void means the method doesn't return anything and changing bill to type double let's us pass numbers with decimals to the calcTip method. I hope this helps!

Download txt
You might be interested in
What are some of the functions in the Consolidate dialog box? Check all that apply.
goblinko [34]

Answer:

sum average and count is the answer

5 0
3 years ago
Write a structure declaration to hold the following data about a savings account: Account Number (string object) Account Balance
Citrus2011 [14]

Answer:

Explanation:

The following is written in C and creates a structure declaration named savingsAccount and adds all of the values into it as defined in the question.

struct savingsAccount {

char AccountNumber[] = "";

double AccountBalance;

double InterestRate;

double AverageMonthlyBalance;

}

4 0
3 years ago
1) Create a recursive program that prompts the user for a nonnegative integer N and outputs. a) Sum [N] b) BiPower [N] c) TimesF
Georgia [21]

Answer:

//Code is created using java

import java.util.*;

// returns the sum

public int sum(int N)

{

if(N==1)

return (1);

else

return N+sum(N-1);

}

// code to return the Bipower ouput

public int BiPower(int N)

{

if(N==1)

return (2);

else

return 2*BiPower(N-1);

}

// Code to return TimesFive output

public int TimesFive(int N)

{

if(N==1)

return 5;

else

return 5 + timesFive(N-1);

}

public static void main(String args[])

   {

//Prompts the user to enter a nonnegative integer

       int N  = Integer.parseInt.(console.readLine("Enter a nonnegative integer:  "));

//Outputs the sum, Bipower and TimesFive

       System.out.println(sum(n));

       System.out.println(BiPower(n));  

       System.out.println(TimesFive(n));

   }

}

4 0
3 years ago
When an instance of a class, or object, is specified as a parameter to a method, a reference to the said object is passed to the
OLEGan [10]
Or pointer

VERY similar.
5 0
3 years ago
Create a program that has at least three classes. The class with main. A class that defines a Name (first name, middle name, and
Bond [772]

Answer:

See attached file for complete detailed code.

Explanation:

See attached file.

Download txt
3 0
3 years ago
Other questions:
  • Informs the network interface card to pass packets sent to that address to the ip stack so their contents can be read, and tells
    9·1 answer
  • What technology process would help you access files at all times?
    11·1 answer
  • To refine the in-between motions, a computer animator uses a mathematical function called a(n)
    14·1 answer
  • What are 3 websites that talk about density of different gases, density in air, behavior of different gases of earth, convection
    13·1 answer
  • Dakota's friend Stephen created a cypher using the QWERTY keyboard, but Dakota is confused. Stephen said to move one to the righ
    5·1 answer
  • Rain forests clean the air by producing oxygen. Some rain forest plants have healing properties, and can be used as medicine. Ra
    12·1 answer
  • Definition of powerpoint animation
    14·1 answer
  • Presentation graphics programs contain an assortment of tools and operations for creating and editing slides, including preforma
    8·2 answers
  • Radio waves can be used to transmit energy. What is an advantage of this method in computer technology
    7·2 answers
  • What do you think entertainment or gaming platforms will look like in the future?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!