Pseudo.Pgm2.Summer2011

Pseudo.Pgm2.Summer2011 - Pseudo-code for Program 2 Be sure...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Pseudo-code for Program 2 /** Be sure to add Javadoc entries * * Every method should have an @param and an @return * Javadoc comments MUST precede every method in Java */ // Could put the following logic in a getInputs static method in class Main. But for now, let’s keep this inline. Prompt for user’s name (first and last). // two separate prompts, one for first name one for last. Read in string values for firstName and lastName. Set count to 0 Prompt for user’s classification as an integer ranging from 1 to 5 (frosh to grad student) Loop while (count < 3) If classification not equal 1 through 5 Increment count Else If classification = 1 Set classification to Freshman Else if classification is a 2 Set classification to Sophomore Etc. Break (leave while loop) End if If count < 3 Prompt user with same message Read in user’s value for classification Else Display Sorry, Charlie. Get a life! Break
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/26/2011 for the course COP 2551 taught by Professor Roggio,r during the Summer '08 term at UNF.

Page1 / 2

Pseudo.Pgm2.Summer2011 - Pseudo-code for Program 2 Be sure...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online