import java.util.ArrayList;
import java.util.Scanner;
import java.io.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;
/**
* Write a description of class Auction here.
*
* @Bong Suk Ing
* @20/10/2011
*/
public class Auction
{
private int displayPrice;
private int increase;
private int decrease;
private ArrayList<String> profile;
private int BidPriceRangeNew;
private int BidPriceRangeOld;
private int [] maxValues;
private int [] minValues;
private int [] addValues;
private int count = 0;
public Auction()
{
profile = new ArrayList<String>();
}
public void propertyReadFromFile()
{
/**
* Read datas from Property.txt
*/
try
{
BufferedReader reader = new BufferedReader(new FileReader("property.txt"));
String line = null;
while ((line = reader.readLine()) != null){
String[] tempString ;
tempString = line.split("-");
int numb = Integer.parseInt(tempString[0]);
minValues[count] = numb;
tempString = tempString[1].split("=");
int numb1 = Integer.parseInt(tempString[0]);
maxValues[count] = numb1;
int numb2 = Integer.parseInt(tempString[1]);
addValues[count] = numb2;
count ++;
}
}catch(Exception e)
{
e.printStackTrace();
}
}
public void setDisplayPrice(int newDisplayPrice)
{
displayPrice = newDisplayPrice;
}
public int getDisplay()
{
return displayPrice;
}
public int increment(int increase)
{
increase++;
return increase;
}
public void decrement(int decrease)
{
decrease--;
}
}
can anyone help me with whr to ask the user to input the displayPrice? then how to detect it which range it is? ><
and how to create the main for it to work ?
help with the coding k? guys :(
thanks alot!