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
ludmilkaskok [199]
3 years ago
13

Given a class called Measure that has the methods and data as specified, choose the correct code to satisfy the requirements of

the class.
public class Measure implements Comparable

{

//Instance variables yards, feet, inches;

//Constructors (default and overloaded)

//Accessors for yards, feet, and inches

//Mutators for yards, feet, and inches


//totalInches returns an int of the total inches for the current object

//toString returns a string in the form: 6 yards, 2 feet, and 5 inches

//Adding 2 measure objects (current object and one passed in as a parameter)

//addMeasure returns a measure object that is the sum of two measure objects,

// the current object and one that is passed in as a parameter

}

Which of the following would be the correct implementation for the method totalInches that returns an int of the total inches for the current object in the measured class? (36 inches = 1 yard)

A. return 36 * feet + 12 * yards + inches;
B. System.out.println(36 * yards + 12 * feet + inches);
C. int total = 36 * yards + 12 * feet + inches;
return total;
D. none of these
Computers and Technology
1 answer:
Nina [5.8K]3 years ago
7 0

Answer:

D

Explanation:

You might be interested in
The action in which a router divides and forwards incoming or outbound message traffic to multiple links is known as
kipiarov [429]
Load balancing is my best guess.
5 0
3 years ago
Select the most likely outcome of making only on-time minimum payments to a credit
Serjik [45]
The answer is B. Your will have gone mostly towards paying interest and you will still owe the majority of the balance that you had from ago
4 0
3 years ago
Two parter:
sashaice [31]

Answer:

This is an infinite loop.

Explanation:

The while loop while never end since the last statement inside the while loop will continue to decrement the value of num by 1 and the condition num < 9 will always be true.

So either change the condition of the while loop like: num > -9

or start incrementing the variable num in the last statement of the while loop like:

num = num + 1

Note: Don't make both changes at the same time.

Visit: gotit-pro.com for fastest, top-notch and impeccable homework and exams help in a range of subjects and ace your academics.

Thanks and Best Regards: Your Friendly Study Co-Pilot

6 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
What is a computer network that provides connectivity in a geographic area or region larger than that covered by a local area ne
lina2011 [118]

Answer:

The correct answer for the given question is "Metropolitan Area Network"

Explanation:

The metropolitan area network connect the user with a geographic area of the size of  metropolitan area.Metropolitan area network connect LAN i.e " local area network " to a single larger network thats provide efficient  connection to the WAN network.Their are many advantage to use metropolitan area network which are mention above .

  • Provides the better security then other network.
  • Cheaper lost when we connect MAN with WAN.
  • If we use MAN network then data will be fastly transferred.
6 0
3 years ago
Other questions:
  • The _________ specifies the station(s) for which the frame is intended. it may be a unique physical address, a group address, or
    5·1 answer
  • select three types of school which specifically emphasize learning through creativity, self expression, and play
    10·2 answers
  • A popular use of cd-rw and cd-r discs is to create audio cds. what is the process of copying audio and/or video data from a purc
    11·1 answer
  • This is not an appropriate business use for a wiki. editing corporate documents getting customer feedback project management pub
    11·1 answer
  • What is the difference between LANs and WANs and the internet
    11·2 answers
  • Assume that strikeCounter has already been declared to be a "pointer to int". Assume further that strikeCounter has been initial
    7·1 answer
  • Explain in your own words how remote-access Trojans (RATs) work. How can these be used by attackers? How would a network adminis
    10·1 answer
  • I need help with writing the code in Python that draws an arrow pointing to the right.
    15·1 answer
  • What are the benefits of building redundancy into a network?
    12·1 answer
  • Write a method called removeHighPrice that will go through a provided ArrayList called prices and removes the first price that i
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!