Crenox

TapeDeck Program

Jan 14th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. package samkough.main;
  2.  
  3. public class TapeDeck
  4. {
  5. public static void main(String [] args)
  6. {
  7. TapeDeckTest ta = new TapeDeckTest();
  8.  
  9. ta.canRecord = true;
  10. ta.playTape();
  11.  
  12. if (ta.canRecord == true)
  13. {
  14. ta.recordTape();
  15. }
  16. }
  17. }
  18.  
  19. ------------------------------------------------------------------------------------------------------------------
  20.  
  21. package samkough.main;
  22.  
  23. public class TapeDeckTest
  24. {
  25. boolean canRecord = false;
  26.  
  27. public void playTape()
  28. {
  29. System.out.println("tape playing");
  30. }
  31.  
  32. public void recordTape()
  33. {
  34. System.out.println("tape recording");
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment