http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
public static String[] itemDetails =
{ "item ID", "item Title", "item Description", "item Price", "quantity in stock", "quantity in order", "release day"};
public static String[] cdDetails =
{ "CD type", "artist name", "number of Tracks", "Duration" };
public static String[] bookDetails =
{ "Book type", "ISBN", "author name", "publisher" };
public List addItem() {
boolean isCD = true;
List list = new List();
BookStoreUtility bsUtil = new BookStoreUtility();
CD cd = new CD();
Book book = new Book();
for ( int i = 0; i < itemDetails.length; i++ ) {
input = Keyboard.readStr(); // get input from users
if ( i == 0 ) {
if ( ( input.charAt(0) == 'c' || input.charAt(0) == 'C') )
isCD = true;
else
isCD = false;
}
if (isCD)
PopulateCD(i, input, cd);
else
PopulateBook(i, input, book);
}
list.add(cd);
return list;
}
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|