Define a method printFeetInchShort, with int parameters numFeet and numinches, that prints using and shorthand. End with a newline. Ex: printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote. 4227842543518.qx3zqy7 1 import java.util.Scanner; 2 3 public class Height Printer ( 4 5 6 7 8 9 10 11 12 13. 14 15 16 17 18} public static void main (String [] args) { new Scanner(System.in); } Scanner scnr int userFeet; int userInches; userFeet scnr.nextInt (); user Inches scnr.nextInt (); printFeet Inchshort (userFeet, userInches); // will be run with (5, 8), then (4, 11) 1 test passed All tests passed
Define a method printFeetInchShort, with int parameters numFeet and numinches, that prints using and shorthand. End with a newline. Ex: printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote. 4227842543518.qx3zqy7 1 import java.util.Scanner; 2 3 public class Height Printer ( 4 5 6 7 8 9 10 11 12 13. 14 15 16 17 18} public static void main (String [] args) { new Scanner(System.in); } Scanner scnr int userFeet; int userInches; userFeet scnr.nextInt (); user Inches scnr.nextInt (); printFeet Inchshort (userFeet, userInches); // will be run with (5, 8), then (4, 11) 1 test passed All tests passed
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![CTU Class Homepage.
zy Section 4.1 - CS 226T: Java Progra X
✰ learn.zybooks.com/zybook/CS226-2204A-03-2204A/chapter/4/section/1
=zyBooks My library > CS 226T: Java Programming home > 4.1: User-defined method basics
CHALLENGE
ACTIVITY
5' 8"
Hint: Use \" to print a double quote.
422784.2543518.qx3zqy7
Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using' and " shorthand. End with a
newline. Ex: printFeetInchShort(5, 8) prints:
Thank you. Your reservation is co X
ART
1 import java.util.Scanner;
2
5
6
7
3 public class HeightPrinter {
4
8
9
4.1.3: Method call with parameter: Printing formatted measurement.
10
11
12
13
14
15
16
17
18}
Run
}
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
Print - Your Confirmed Reservatic X
int userFeet;
int userInches;
b Success Confirmation of Questic X
userFeet = scnr.nextInt ();
userInches = scnr.nextInt();
printFeet InchShort (userFeet, userInches); // will be run with (5, 8), then (4, 11)
Failed to compile
Height Printer.java:5: error: <identifier> expected
numFeet = numInches;
zyBooks catalog
1 test
passed
All tests
passed
? Help/FAQ
Stacey Queen
X
:
6:17 AM
8/30/2022](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F788fc729-a951-45c4-9909-47eea7bbf82f%2F83739f34-8bbe-4bf9-b884-8dc5847c43f0%2Firezl6x_processed.png&w=3840&q=75)
Transcribed Image Text:CTU Class Homepage.
zy Section 4.1 - CS 226T: Java Progra X
✰ learn.zybooks.com/zybook/CS226-2204A-03-2204A/chapter/4/section/1
=zyBooks My library > CS 226T: Java Programming home > 4.1: User-defined method basics
CHALLENGE
ACTIVITY
5' 8"
Hint: Use \" to print a double quote.
422784.2543518.qx3zqy7
Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using' and " shorthand. End with a
newline. Ex: printFeetInchShort(5, 8) prints:
Thank you. Your reservation is co X
ART
1 import java.util.Scanner;
2
5
6
7
3 public class HeightPrinter {
4
8
9
4.1.3: Method call with parameter: Printing formatted measurement.
10
11
12
13
14
15
16
17
18}
Run
}
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
Print - Your Confirmed Reservatic X
int userFeet;
int userInches;
b Success Confirmation of Questic X
userFeet = scnr.nextInt ();
userInches = scnr.nextInt();
printFeet InchShort (userFeet, userInches); // will be run with (5, 8), then (4, 11)
Failed to compile
Height Printer.java:5: error: <identifier> expected
numFeet = numInches;
zyBooks catalog
1 test
passed
All tests
passed
? Help/FAQ
Stacey Queen
X
:
6:17 AM
8/30/2022
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education