Compsci


SUBMITTED BY: Guest

DATE: Nov. 29, 2013, 8:24 a.m.

FORMAT: Text only

SIZE: 1.4 kB

HITS: 2708

  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package com.itechnoguy;
  7. import java.util.Scanner;
  8. /**
  9. *
  10. * @author Issac
  11. */
  12. public class validate {
  13. /**
  14. * @param args the command line arguments
  15. */
  16. public static void main(String[] args) {
  17. Scanner reader = new Scanner(System.in);
  18. student student = new student();
  19. String name;
  20. System.out.println("Enter the student's name: " );
  21. name = reader.nextLine();
  22. student.setName(name);
  23. System.out.println("Score for test one: " );
  24. student.setScore(1, reader.nextInt());
  25. System.out.println("Score for test two: " );
  26. student.setScore(2, reader.nextInt());
  27. System.out.println("Score for test three: " );
  28. student.setScore(3, reader.nextInt());
  29. if (name == null)
  30. System.out.println("Sorry, a name is required.");
  31. else if ()
  32. String result = student.validateData();
  33. if(result == null)
  34. System.out.println("Student is valid.");
  35. else
  36. System.out.println(result);
  37. }
  38. }

comments powered by Disqus