Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public Theater() {
  2. seats = new double[3][4];
  3. totalSales = 0;
  4.  
  5. String inputFileName = "seatPrices.txt";
  6. File inputFile = new File(inputFileName);
  7. Scanner in = null;
  8. try {
  9. in = new Scanner(inputFile);
  10. } catch (FileNotFoundException e) {
  11. // TODO Auto-generated catch block
  12. e.printStackTrace();
  13. }
  14.  
  15. for (int i = 0; i < 3; i++) {
  16. for (int j = 0; j < 4; j++) {
  17.  
  18. seats[i][j] = in.nextDouble();
  19. // System.out.println("["+i+"] ["+j+"] = "+ in.nextDouble());
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement