|
-
Oct 30th, 2001, 03:29 PM
#1
Thread Starter
Fanatic Member
arrghhh this is right or is it ??
well, it looks alright to me
Code:
/** this is the main program to be run and it is called Shop
*/
import Supplier;
import Product;
public class Shop {
public static void main(String args[])
{
/**here is where i will put in all of the information about the suppliers, once i have done this i will do the same for the products */
Supplier Supplier1 = new Supplier ("Bobbies Suppliers", "6 Oak Street, Aberystwyth", 123654, 123655);
Supplier Supplier2 = new Supplier ("Franks Fruits", "32 Flan Street, Newtown Road, Aberystwyth", 112233, 112244);
Supplier Supplier3 = new Supplier ("Dai, What Big Veg", "43 Hereford Close, Somersham, Hunts", 823894, 823456);
Supplier Supplier4 = new Supplier ("Aubreys Fruit and Veg", "25a Parkhall Road, Somersham, Hunts", 223354, 223356);
Supplier Supplier5 = new Supplier ("JVC Veggies", "27 Slade Close, Ramsey, Hunts", 998764, 998763);
Product Prod1 = new Product ("Carrots", "0.30", "Each");
Product Prod2 = new Product ("Potatoes", "2.00", "Per Bag");
Product Prod3 = new Product ("Apples", "0.28", "Per Lbs");
Product Prod4 = new Product ("Oranges", "0.20", "Each");
/** This is where all of the information is being joined together and printed on the screen, man i am getting hungry now, might get something to east soon ;) */
System.out.println ("This is the Shop Demo");
System.out.println ("\nThe name of the first supplier is - " + Supplier1.getTheName() + " ,\nand their address is - " + Supplier1.getTheAddress() + " ,\nand their phone number is - " + Supplier1.getThePhone() + " ,\nand their fax number is - " + Supplier1.getTheFax() + " .");
System.out.println ("\n\nThe name of the second supplier is - " + Supplier2.getTheName() + " ,\nand their address is - " + Supplier2.getTheAddress() + " ,\nand their phone number is - " + Supplier2.getThePhone() + " ,\nand their fax number is - " + Supplier2.getTheFax() + " .");
System.out.println ("\n\nThe name of the third supplier is - " + Supplier3.getTheName() + " ,\nand their address is - " + Supplier3.getTheAddress() + " ,\nand their phone number is - " + Supplier3.getThePhone() + " ,\nand their fax number is - " + Supplier3.getTheFax() + " .");
System.out.println ("\n\nThe name of the fourth supplier is - " + Supplier4.getTheName() + " ,\nand their address is - " + Supplier4.getTheAddress() + " ,\nand their phone number is - " + Supplier4.getThePhone() + " ,\nand their fax number is - " + Supplier4.getTheFax() + " .");
System.out.println ("\n\nThe name of the fifth supplier is - " + Supplier5.getTheName() + " ,\nand their address is - " + Supplier5.getTheAddress() + " ,\nand their phone number is - " + Supplier5.getThePhone() + " ,\nand their fax number is - " + Supplier5.getTheFax() + " .");
System.out.println ("\n\n The first product is - " + Prod1.itemName() + "\n It is £" + Prod1.theCost() + " " + Prod1.theUnitSale() + ".");
// need to join these supplier to food at some point
}
}
but for some reason on the Product part, it says that it can't resolve the "n" on the keyword new when i go to compile it, any ideas, and i think that i have got all of the capitals sorted out this time 
please help
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|