Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help please the second photo is input. Javafile Programming Assignment #3: (8 points) This assignment focuses on file input/output and strings. Turn in a .zip

image text in transcribedimage text in transcribedhelp please the second photo is input. Javafile

Programming Assignment #3: (8 points) This assignment focuses on file input/output and strings. Turn in a .zip file that has your.java file and mymadlib.txt. The program is to create a computerized version of game called "Mad Libs". Mad libs are short stories that have blanks called placeholders to be filled in. In the non-computerized version of this game, one person asks a second person to fill in each of the placeholders without the second person knowing the overall story Once all placeholders are filled in, the second person is shown the resulting story, often with humorous results. Here is a short video for how to play the non-computerized version When creating a new mad lib, the program prompts the user for input and output file names. Then the program reads the input file, prompting the user to fill in any placeholders that are found without showing the user the rest of the story. As the user fills in each placeholder, the program is writing the resulting text to the output file. The user can later view the complete mad lib story by accessing the output file and you to direct him where this file is stored in his machine as part of your console output. Also, you need to print how many lines are in the final story and how many words. The log below shows one sample execution of the program Welcome to the game of Mad Libs. I will ask you to provide various words and phrases to fill in a story Enlut noileoname storYatKE mabidib.txt File not found. Try again: adlib. txt. Output file name: out.txt Please type an adiective: sill Please type a plural noun: appIes Please type a noun: frisbee Please type an adjective: hun Please type a place: Bellevue Please type a plural noun: bees Please type a noun: umbrella Please type a funny u Please type an adjective: shin Please type a noun: ielly donu Please type an adiective: beautiful Please type a plural noun: Please type a person' s name Keanu Reeves Your mad-lib has been createdT T0u an access your out!.text in your C:/ directory. Your story made out of 10 lines with 98 word. Notice that if an input file is not found, for creating a mad-lib the user is re-prompted. No re-prompting occurs for the output file. If it does not already exist, it is created. If it already exists, overwrite its contents. (These are the default behaviors in Java.) You may assume that the output file is not the same file as the input file

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

Students also viewed these Databases questions

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

Prepare a short profile of victor marie hugo ?

Answered: 1 week ago