Project#4 - Matt Hergenrether Section 10 Programing...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 // Matt Hergenrether // Section 10 // Programing assignment #4 // CS 1113 // Spring 2008 // This program will sort a valid child into the correct house // based on certain rules. // For a child to be valid they must currently be between the // ages of ten and twelve, inclusive. // The rules for which house the are entered are as follows: // If the last name starts with a 'S' then the student // is placed in Slytherin. // If the last name starts with a 'R' then the student // is placed in Ravenclaw. // If the last name starts with a 'G' then the student // is placed in Gryffindor. // If the last name starts with a 'H' then the student // is placed in Hufflepuff. // If it does not meet one of the previous four rules the // student is placed in Slytherin. import java.util.* public class Hogwarts { public static void main(String[] args) { // Declare named constants // Declare variables String lastName = "" String testLine String testAge = "" int age = 0 int i = 0 int x = 0 //Create a Scanner Object to read in data.
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 09/28/2011 for the course CS 1113 taught by Professor Chandler during the Fall '08 term at Oklahoma State.

Page1 / 3

Project#4 - Matt Hergenrether Section 10 Programing...

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