Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You must provide: Comments at the top of your program including your name Good variable names Proper indentation Exact output as provided. Proper number of

You must provide:

Comments at the top of your program including your name

Good variable names

Proper indentation

Exact output as provided.

Proper number of methods.

ASSIGNMENT OVERVIEW:

You will write a program that asks the user the following questions and then creates a story based on the users input. You must create the exact same output and the answers to all the questions must be exactly the same as the provided output. A shell has been provided for you to fill in the information

The programs should ask the user to enter the following information and store the input from the user

1. His or her name

2. His or her year of birth

3. The name of a city of the college attending

4. The name of a college

5. The graduation year

6. A profession

7. A type of animal

8. A pets name

9. Gender (he or she)

10. Ages for three siblings

11. Something of your choosing that is type double

12. Anything else you would like the user to enter.

After the user has entered these items, the program should display a story, inserting the users input into the appropriate locations.. Here is a sample output.

What is your name(enter all lower case letters): mary

Are you a she or he? (enter all in lower case letters) she

Hi MARY what year where you born? 1999

What is the name of your college? Sac state

What city is your college in? sacramento

What year will you be graduated? 2022

What would be your profession? programmer

What kind of pet do you have? dog

What is your pet's name?(Enter the name all lower case letters) mia

What is your the website that you visit the most? www.csus.edu

Enter the ages of your siblings:

--> 23

--> 14

--> 21

Here is the story for you:

Once up on a time there was someone named YRAM, she was 19 years old.

She was attending Sac state college. She became a programmer within 4 years.

One day on the way home MARY saw a dog wondering the streets of Sacramento.

MARY adopted the dog and named the dog Mia. MARY had 3 siblings and the youngest sibling is 23 years old and the oldest sibling is 14 years old. She spent a lot of time on the computer visiting the website with the domain name csus. MARY and Mia lived happily ever after!

WRITE YOUR PROGRAMS

1. Follow good program style and documentation.

2. Get the data from the user, utilizing the Scanner Class to read keyboard input.

The Scanner class is not automatically available in your Java programs. Any program that uses the Scanner class must first have the following statement near the beginning of the file before any class definition

import java.util.Scanner;

This statement tells the Java compiler where in the library to find the Scanner class and makes it available to your program.

3. After the user has entered these items, the program should display the story inserting the users input into the appropriate locations.

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions