Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just provide the coding where it says: //PLEASE PUT YOUR WORK HERE //PLEASE END YOUR WORK HERE The questions are provided before the starting of

Just provide the coding where it says:

//PLEASE PUT YOUR WORK HERE //PLEASE END YOUR WORK HERE

The questions are provided before the starting of the codes as well. Don't change the code.

All sub-parts need to be answered. All the codes are provided. Must be in Java. Must compile.

1.A.

You will be given two strings: a noun and an adjective. Based on that input you will output the sentence "noun is adjective".

Write the body of the program called Pod.java

image text in transcribed

CODE:

import java.util.*;

/** * The following is the only class of the program and contains all * program code. The program starts running in the main() of this class. */

public class PoD {

/** * Main method that runs when the program is started. */ public static void main(String[] args) { //Instantiate new scanner to read from the console. Scanner in = new Scanner( System.in ); //Declare & initialize variables String noun = in.next(); String adjective = in.next(); //PLEASE START YOUR WORK HERE //PLEASE END YOUR WORK HERE } }

----------------------------------------------------------------------------------------

1.B.

You will be given two strings: a noun and an adjective. Based on that input you will either output the sentence "noun is adjective" or "noun are adjective". You will decide whether to use the word is or are based on the whether or not the noun ends with an "s".

Write the body of the program called Challenge.java

image text in transcribed

image text in transcribed

CODE:

import java.util.*;

/** * The following is the only class of the program and contains all * program code. The program starts running in the main() of this class. */

public class Challenge {

/** * Main method that runs when the program is started. */ public static void main(String[] args) { //Instantiate new scanner to read from the console. Scanner in = new Scanner( System.in ); //Declare & initialize variables String noun = in.next(); String adjective = in.next();

//PLEASE START YOUR WORK HERE

//PLEASE END YOUR WORK HERE

} }

Input an adjective (adjective). Processing The program prints out the required text, followed by a new- line, and exits Output Based on the noun and adjective that were provided, the output will be: noun is adjective. The text must be terminated by a new-line character, which is added automatically by the System.out.println) function. Examples Sample Input Sample Output This fun This is fun. Math is easy Joey strong Joey is strong

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago