Overview In this task, you should try using the Scanner class to read data from the keyboard. This data should be stored in variables in your program and then printed on screen.   Task You should write a class called Story that should include a main method. This programs should create a fairy tale for a child. The program is based on a completed story, but some words must be replaced with such as the user may enter. The fairy tale you are going to based on are the following:   The little ant (1) There was once a small, small ant that lived with its (2) and its (3) siblings in an anthill, by a large (4) in the forest. The little ant is called (1). For the most part, (1) and his siblings used to work on carrying (5) and (6) to the stack, but today it was (7), so (1) was free. The words that are crossed out are the words that your program should ask the user for. In total, there are seven entries the user must make. The program must save these entries in separate variables and then print them on  the screen according to the saga above. The words your program should ask for are: The name of the ant? Who does the ant live with? How many siblings does the ant have? Where somewhere in the forest is the anthill? What does the ant and the siblings carry into the stack? What more does the ant and the siblings bring to the stack? What is the special day that makes the ant free? Requirement In order for the task to be considered approved, you must use an object of the Scanner class when you ask the user for data. All input must be made before the story is printed on the screen. Printing should be done using System.out.print, System.out.println and / or System.out.format.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Overview

In this task, you should try using the Scanner class to read data from the keyboard. This data should be stored in variables in your program and then printed on screen.

 

Task

You should write a class called Story that should include a main method. This programs should create a fairy tale for a child. The program is based on a completed story, but some words must be replaced with such as the user may enter. The fairy tale you are going to based on are the following:

 

The little ant (1)

There was once a small, small ant that lived with its (2) and its (3) siblings in an anthill, by a large (4) in the forest. The little ant is called (1). For the most part, (1) and his siblings used to work on carrying (5) and (6) to the stack, but today it was (7), so (1) was free.

The words that are crossed out are the words that your program should ask the user for.

In total, there are seven entries the user must make. The program must save these entries in separate variables and then print them on

 the screen according to the saga above.

The words your program should ask for are:

  1. The name of the ant?
  2. Who does the ant live with?
  3. How many siblings does the ant have?
  4. Where somewhere in the forest is the anthill?
  5. What does the ant and the siblings carry into the stack?
  6. What more does the ant and the siblings bring to the stack?
  7. What is the special day that makes the ant free?

Requirement

In order for the task to be considered approved, you must use an object of the Scanner class when you ask the user for data. All input must be made before the story is printed on the screen. Printing should be done using System.out.print, System.out.println and / or System.out.format.

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY