SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

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 Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 15 Oct 2017 My Price 9.00

I need help for a program in jgrasp instructions are attached and please add comments

I.Java application that executes the following 5recursivemethods, each ofwhichreturns a value(do NOT use System.out.print() inside the methoddefinitions), and prints that value in the main() method, wherexis a positiveinteger on the commandline (1st argument), andsis a String on thecommandline (2nd argument).A. Method 1: Return and print in main() x number of s (ssss...), in otherwords print the String s, x times.B. Method 2: Return and print in main() the first character in s, x number oftimes (ssss...), where "s" is the first letter in String "s".C. Method 3: Return and print in main() each letter in s two times(s0s0s1s1s2s2s3s3...) where s0is the first letter, s1is the second letter, s2isthe third letter, etc.D. Method 4: Return and print in main() each letter in s three timesbackwards (sn-1sn-1sn-1sn-2sn-2sn-2sn-3sn-3sn-3sn-4sn-4sn-4...) where sn-1is the lastletter, sn-2is the second to last letter, sn-3is the third to last letter, etc.E. Method 5: Return and print in main() a String which counts down by 1for x, and deletes one letter for each recursion for s, until x becomes 1, oruntil s has only 1 letter (x s, x-1 s1 letter deleted, x-2 s2 letters deleted, x-3 s3 lettersdeleted...)II.Use the commandline arguments to enter one positive integer (a number)as 1st argument, and a String (a word) as the 2nd argument.A. see this webpage forinstructions on commandline arguments.B. You need to convert the 1st commandline argument to an integer:Integer number = Integer.parseInt(args[0]);C. Note that "number" is the same as "x" in the above explanation.D. You need to store the 2nd commandline argument in a String variable:String word = args[1];E. Note that "word" is the same as "s" in the above explanation.
Background image of page 1
F. You may find it useful to use more than one parameter for some of yourmethods.II.At the beginning of the main method, check to make sure that the userentered the correct input.A. If exactly one (1) positive integer argument is not entered on the commandline,then display an error message and end the program.B. You also need to have a try-catch statement just in case a non-integer isinputted as a commandline argument.II.Make sure your code follows theIII.Java Coding standard, in particular the Java documentation (Javadoc)comments that go above each method.IV.Write youroriginal commentsevery 3-5 lines of code.ï‚·Every method should be preceded with a descriptive comment using the"JavaDoc" notational convention.ï‚·The comment should name the method, describe its purpose, comment allparameters, the return value, and any exceptions using JavaDoc keywords.ï‚·ï‚·Detailed description line by line:ï‚·Begins with a slash, followed by two asterisks (/**)ï‚·One asterisk (*)ï‚·One asterisk (*), followed by @param, followed by the name of the parameter,followed by a description of the parameter (Omit if there are no parameters.Use one line for each parameter, so two parameters will have two lines. 3parameters will have 3 lines. Etc.)ï‚·One asterisk (*), followed by return, followed by a description of the returnvariable (Omit if the return value is void.)
Background image of page 2

Attachments:

Answers

(5)
Status NEW Posted 15 Oct 2017 11:10 AM My Price 9.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)