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
How does polymorphism enable you to program "in the general" rather than "in the specific"? Discuss the key advantages of progra
barxatty [35]

Answer:

Explanation:

When programming in an OOP language classes are created to represent real-life objects, people, places etc. from the real world. Programming in the general allows you to cut down your code and making it more efficient by applying the same necessary functions to all of the objects that classify under the same category. For example by programming "in the general" and creating an Animal class you can create all of the functions/behaviors that animals tend to have. Then you can apply these functions/behaviors to various animals such as a Cat, Dog, Horse, etc. But if you program in the specific you cannot apply a Cat class to a Dog since they are not the same thing.

4 0
2 years ago
A brief communication used in businesses is called a _____.
Bad White [126]

Answer:

C. Memo

Explanation:

Hope this helps :)

6 0
2 years ago
Read 2 more answers
Who made the first electronic device?
emmasim [6.3K]
Joseph Henry in about 1835. He is American and he made something called a relay.
6 0
2 years ago
g You and your friend both send documents to the printer, but the printer can only print one document at a time. What does it do
Sedbober [7]

Answer:

It places the document in a buffer

Explanation:

Since the printer can only print a document at a time, the other document is going to be placed in a buffer.

The print buffer can be described as a location in memory that has the function of holding data that is going to be sent to a computers printer. A print job such as in this scenario may remain in the buffer because another document is to be printed first.

Sometimes a document could be put in the buffer because the computer is waiting for the printer to respond. This is just another reason why documents are placed in a buffer.

5 0
2 years ago
Match the term to its correct defintion
emmasim [6.3K]

Answer:

View Base tables: Virtual table based on a SELECT query

CREATE VIEW statement: Data definition command that stores the query specification in the data dictionary

DROP VIEW statement: Data definition command that removes the query specification in the data dictionary

Explanation:

Views are virtual tables, which can be created by select queries using the real database tables.

Creating and dropping views can be done by the CREATE VIEW and DROP VIEW statements.

<u>CREATE VIEW syntax:</u>

CREATE VIEW view_name AS

SELECT column1, column2, ...

FROM table_name

WHERE condition;

<u>DROP VIEW syntax:</u>

DROP VIEW view_name;

5 0
3 years ago
Other questions:
  • If your DTP document contains watermarks on every page, where can you place them?
    13·2 answers
  • A slideshow that accompanies an oral report is known as what?
    6·1 answer
  • In the ____________________ approach, the project is initiated by upper-level managers who issue policy, procedures and processe
    8·1 answer
  • One of the most common uses of spreadsheet are
    12·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • What does aperture control? A)amount of light the image sensor captures when taking a photo. B)how sensitive the camera is to in
    10·2 answers
  • Lindsey also needs to calcite the commissions earned each month. If the company earns $200,000 or more in a month, the commissio
    5·1 answer
  • The people on this platform are unbelievably nice. its almost rare to see this type of kindness online these days. Just wanted t
    14·1 answer
  • What is the name of the arm that is attached to the read/write head?
    13·1 answer
  • Henry wants to create a presentation for his clients. He wants to upload the presentation file directly to the Internet. Which p
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!