课程: Level Up: Java
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Parse a CSV file
- [Narrator] It's a Friday night and there's a concert downtown. However, before they let anyone in, security has to make sure each person reserved a ticket in advance. Security has a CSV file with each ticket holder name, along with the number of tickets they bought. Your challenge is to create a program that imports this CSV and checks if a given person bought a ticket as well as how many tickets they bought. If the person is not on the list, or they did not buy enough tickets for their whole party, they should not be let in. In the code space, there's an app class for running your function. And a CSV file containing the ticket holders. Good luck. (upbeat music) To start off, we create a list of ticket holders in memory. We'll use it to keep track of who has tickets and how many they have. A ticket holder is someone with a name and a quantity of tickets and we have a model class with setters and getters and…