APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 4 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Computer Science Posted 16 Jul 2017 My Price 11.00

Object Oriented Application Development

I am having some issues with my assignment for IT 511 (Object Oriented Application Development). When I go to test the following code I receive numerous errors and I am not sure why

 

package message.array;

 

import java.util.Scanner;

 

/**

 *

 * @auth gregory.hauptman

 */

public class ShoutBox {

   

  public static void main(String[] args) {

    String[] messages = new String[10]; //declaring 10 arrays

    messages[0] = "Today is May 2, 2017";

    messages[1] = "This year is almost half over"; 

    messages[2] = "The weather is beautiful today";

    messages[3] = "Why is the weather always nice when I have to work?";

    messages[4] = "Hopefuly the weather is beautiul tomorrow";

    messages[5] = "I am learning the Java programming language";

    messages[6] = "Hacksaw Ridge was a great movie!";

    messages[7] = "I am looking forward to Red Dead Redemption 2 later this year";

    messages[8] = "It's good to have family and friends near by";

    messages[9] = "This is the final project for this course";

           

    String m = new ShoutBox().shoutOutCannedMessage(messages); //place the messages in the shoutbox

    System.out.println(m); 

  }

   

  public String shoutOutCannedMessage(String[] messages){

    Scanner in = new Scanner(System.in);

     

    for(int i = 0; i < messages.length; i++){ //creates a number to relate each of the messages

      System.out.println(i+ ". " +messages[i]); //Print out the messages with number assignment

    }

    System.out.println("Please choose a message");

     

    int idx = in.nextInt(); //copies the array an allows the answer to be input

     

    String message = messages[idx]; //allows the program to match the number to the message

     

    return message; //prints out the message associated with the selected number

     

  }

   

}

Answers

Not Rated (0)
Status NEW Posted 16 Jul 2017 07:07 AM My Price 11.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)