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
Lady bird [3.3K]
3 years ago
7

In java Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. Ex:

printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote.
import java.util.Scanner;

public class HeightPrinter {

/* Your solution goes here */

public static void main (String [] args) {
printFeetInchShort(5, 8);
System.out.println("");

return;
Computers and Technology
1 answer:
USPshnik [31]3 years ago
3 0

Answer:

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

Explanation:

To format the output properly, make use of the excape sequences (\' and \'') with string concatenation.

The complete code is given below:

public class StringLength {

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

   public static void main(String[] args) {

       printFeetInchShort(5, 8);

       System.out.println("");

   }

}

You might be interested in
What will be the output of the following program? Assume the user responds with a 5.
FrozenT [24]

The output will be: You owe $ 15.0

4 0
3 years ago
Does anyone know how to execute this assignment on Scratch?
lapo4ka [179]

Execute this assignment from Scratch in the following way

Explanation:

1.For each thread, first Scratch sets the 'active thread' to that thread. Then, it executes each block one by one in the stack for the active thread. It will execute the entire stack all in one go if it can.

2.The Hide block is a Looks block and a Stack block. If the block's sprite is shown, it will hide the sprite — if the sprite is already hidden, nothing happens. This block is one of the simplest and most commonly used Looks blocks.

3.Scratch is used in many different settings: schools, museums, libraries, community centers, and homes.

4.Mitch Resnik, the creator of the super-simple Scratch programming language and head of the Lifelong Kindergarten group at the MIT Media Lab, gave a TEDx talk about the value of coding and computer literacy in early education.

5.

5 0
3 years ago
Rebecca is creating a method for her class, but wants to make sure that a variable in the method satisfies a conditional phrase.
astraxan [27]

Answer:

D. an assertion

From PLATO

6 0
2 years ago
Add criteria to this query to return only the records where the value in the SubscriptionType field is Self or Family and the va
miss Akunina [59]

Click Run in the Results group under the Design tab. Only show records in the search results that have a Credits field value greater than 120. To see the results, run the query. Click the criterion row for the Credits field and enter >120.

<h3>The meaning of the criterion =200</h3>

Equal to or less than 200. To compute statistics like Sum, Average, or Count, add a Total row to the query datasheet.

<h3>How may criteria be set in an Access query?</h3>

Open the query in Design view and choose the fields (columns) you want to set criteria for in order to add criteria to an Access query. Double-click the field to add it to the design grid if it isn't already there.

To know more about criterion row visit:-

brainly.com/question/7301380

#SPJ4

4 0
1 year ago
Have you seen this ProFlipperz Review? It is a course on how to flip every day household items for a profit.
Nadusha1986 [10]

Well if you have one I know it's cool but don't flip it all the time

Explanation:

6 0
2 years ago
Other questions:
  • Which expresses 6y : 9y in its simplest form?
    12·1 answer
  • Worksheet titles and subtitles should be as wordy as possible.<br> a. True<br> b. False
    9·2 answers
  • 6.5 Code Practice: Question 1 please help with code!!! Thank you
    12·1 answer
  • If a driver who is under the age of 21 is stopped by a law enforcement officer and has a blood alcohol level of 0.02 or greater
    8·1 answer
  • You are the head of the corporate security department, and the Microsoft teamhas asked you for some assistance in setting the pa
    11·1 answer
  • Choose all that apply.
    11·1 answer
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • The Save command saves your changes silently without additional prompts, using the same save settings; the Save As command reope
    14·1 answer
  • Starting in 2024 under a new law, all new smartphones sold in the eu must have….
    9·1 answer
  • eocs can be fixed locations, temporary facilities, or virtual structures with staff participating remotely.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!