Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Create a program that incorporates methods, user input, and arrays. Related SLOs: SLO #1: Use an appropriate programming environment to design, code,

Objective: Create a program that incorporates methods, user input, and arrays.

Related SLOs:

    SLO #1: Use an appropriate programming environment to design, code, compile, run, and debug computer programs.
    SLO #3: Illustrate basic programming concepts such as program flow and syntax of a high-level general-purpose language and basic security practices.
    SLO #4: Demonstrate working with primitive data types, strings, and arrays.

Instructions:

    Using jGRASP, write a Java program named LastnameFirstname08.java, using your last name and your first name, that does the following:
        Defines a method called methodOne. You will be able to pass at least one array to this method. The method should use: a multi-way if-else statement.
        Defines a method called methodTwo. It should have 2 parameters. The method should: return an array.
        Defines a method called methodThree. It may have 0 or more parameters. The method should use: a return statement and either one Math or String method.
        Defines a method called methodFour. It may have 0 or more parameters. The method should use: a loop.
        Note: methodOne, methodTwo, methodThree, and methodFour can do anything you want! As long as your methods adhere to the requirements above, you'll get full credit.
        In the main method, explain to the user what 4 tasks your program can do. Ask the user to enter 1, 2, 3 or 4 to choose which task they want your program to do, then call the relevant function.
    Your program MUST:
        Actively use in-line comments stating what each section of code does.
        Have very clear output to the user that explains what is happening in the program (see Example Output).
        Use try/catch if, and only if, necessary.
    Your program must conform to the Java coding standards reviewed in class.
    Your program should not use code/concepts we have not yet covered. You must demonstrate that you have mastered the concepts covered in class.
    Remember to always begin your code with the following documentation comments:

/**
 * Short description of the program.
 *
 * @author     Last Name, First Name
 * @assignment ICS 111 Assignment XX
 * @date       Today's Date
 * @bugs       Short description of bugs in the program, if any.
 */

Expected Output:

    This is an example of what your program should output:

 ----jGRASP exec: java DoeJohn08
Hello! What's your name?
John Mango

Hi, Joe Mango! Let me show you what I've learned in ICS 111 so far!
Here are some things that this program can do:
    1. Translate a word from English to Italian
    2. Write your name backwards!
    3. Print the COOLEST message you'll EVER read
    4. Let you play a game over and over again until you say stop

Please choose one of the options (Type 1, 2, 3, or 4)
2

Option 2: Write your name backwards!
What a great choice!

    Here's your name backwards:
    Ognam Ikkin

    HAHA, isn't that hilarious! :)

Thanks for using my program! Have a great day!

  ----jGRASP: operation complete.

Step by Step Solution

3.45 Rating (164 Votes )

There are 3 Steps involved in it

Step: 1

Based on the instructions provided lets create a Java program that satisfies all outlined objectives and student learning outcomes SLOs Heres an example code that follows the guidelines java This prog... 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

An Introduction to Programming with C++

Authors: Diane Zak

8th edition

978-1285860114

More Books

Students also viewed these Programming questions