Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

For this exercise you will need to write a script that will simulate a classic madlib game. Use Notepad++ or another text editor to develop

For this exercise you will need to write a script that will simulate a classic madlib game. Use Notepad++ or another text editor to develop your script and periodically test it using the script-launcher you used in lab 3C. Save your script to a file named postlab3.jsh.

If you want to work on this from your windows laptop, download the same jar file that you downloaded in Lab 3C and save it to your CSC184-FA18 directory, but download this modified launch script and use it instead of the one you used in class. Save the script in the same directory that holds your CSC184-FA18 directory (not inside the CSC184-FA18 directory itself). If you want to complete this lab on a mac laptop, come see me during office hours and I can help you get started.

This script should prompt the user for four different strings that will be stored in four different variables named adjective, noun, animal, and noise, respectively. For each of these variables, give the user a prompt asking them for an adjective (or a noun, animal, etc..). Store their answers in these variables.

Once you've collected all four of their responses, insert them in to the old macdonald nursery rhyme in the same manner that the following mad libs knockoff does:

http://www.madtakes.com/libs/185.html (Links to an external site.)Links to an external site.

In addition to the normal style guidelines, use exactly one statement to print exactly one line of the nursery rhyme. Include some inline comments at different points of the program to explain to the reader what your program is doing.

Develop a jshell script that reads some input from the user and prints some responses back to the user. You will want to edit it using notepad++ and run it using this script-runner. Download the script-runner jar and place it in your CSC184-FA18 folder. Then download the launch-script batch file and place it in your P: drive (or whatever folder you have the start-jshell batch file in). Double-click the batch file and type the name of your script to test it (it should be in the CSC-184-FA18 folder). Note that this will not work until you've saved the script!

Feel free to use JShell to test out some ideas, but you should primarily work with Notepad++ and launch-script in lab today (and for postlab #3). Work with your assigned partner on this assignment and turn in your script when you're finished.

Interacting with your script should look as much as possible like the example interactions below:

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_2

Step: 3

blur-text-image_3

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students explore these related Databases questions