Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package gwei;
- import java.util.ArrayList;
- public class Insurance {
- public static void main(String[] args) {
- EasyReader file = new EasyReader("customer.dat");
- ArrayList<Customer> customers = new ArrayList<Customer>();
- String temp = file.readLine();
- while(temp != "0") {
- Customer cust = new Customer();
- String[] line = temp.split("\\*");
- cust.setName(line[0]);
- cust.setAge(Integer.parseInt(line[1]));
- temp = file.readLine();
- customers.add(cust);
- }
- EasyReader file2 = new EasyReader("premtable.dat");
- ArrayList<Premiums> premiumList = new ArrayList<Premiums>();
- int temp2 = file2.readInt();
- while(temp2 != 0) {
- Premiums premium = new Premiums();
- premium.setAge(temp2);
- temp2 = file2.readInt();
- premium.setPremium(temp2);
- premiumList.add(premium);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement