Pseudo.Pgm2.Summer2011

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

Info icon This 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 // go to end program (TBD) Endif EndLoop // here we will call a method in Main.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern