All pastes #641159 Raw Edit

Something

public java v1 · immutable
#641159 ·published 2007-07-31 23:30 UTC
rendered paste body
import java.util.*;import java.io.*;class Galois {	private int address;	private int transactions;		public void setAddress(int address) {		this.address = address;			}		public void setTransactions(int transactions) {		this.transactions = transactions;	}		public int getAddress() {		return address;	}		public int getTransactions() {		return transactions;	}	}class Obelix extends Galois {		public Obelix(int address, int transactions) {		setAddress(address);		setTransactions(transactions);	}		}public class Asterix {		public static void main(String[] argv) {		try {			File f = new File("asterix.input");			Scanner scn = new Scanner(f);			int trans, i,size;			size = scn.nextInt();			if (size != 0 ) {				Obelix[] array = new Obelix[size];				for (i = 0; i < size; i++) {					trans = scn.nextInt();					Obelix ovelix = new Obelix(i, trans);					array[i] = ovelix;				}			//Obelix class method calls for transactions here			}		} catch (IOException e) {			System.out.println("Error Message: " + e.getMessage());		}	}}