Advertisement
ryanblume11

CollegeCourses

Dec 3rd, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. //Ryan Blume
  2. //12/2/19
  3. //College Course Program
  4. import javax.swing.*;
  5. import java.util.*;
  6. public class CollegeCourses
  7.  
  8. {
  9. public static void main(String[] args)
  10. {
  11. String[] courses = {"Chemistry 98", "Abstract Geometry 156", "Biology 104", "Advanced Psychology 196", "Computer Science 164", "Astronomy 84", "Journalism 1164", "Social Issues 1104", "Physics 52", "Advanced Pottery 124", "Linear Algebra 142", "Criminal Justice 60", "Contemporary Social Issues 1168", "Cartooning and Design 198", "Intro to Statistics 150", "Physics 141", "Chemistry 124", "Algebra 14", "Physics 1102", "Computer Science 1168"};
  12. int[] num = new int[courses.length];
  13. for(int x = 0; x <=num.length-1; x++)
  14. {
  15.  
  16. String c = courses[x];
  17. int y = c.lastIndexOf(" ") +1 ;
  18. String s = c.substring(y);
  19. int z = Integer.parseInt(s);
  20. num[x] = z;
  21.  
  22.  
  23. }
  24. System.out.println(num[2]);
  25. for(int a = 0; a<=num.length-1; a++)
  26. {
  27. int b = x+1
  28. if(num[a] > num[a]+1)
  29. {
  30. }
  31.  
  32. }
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement