Last change
on this file since 211 was 211, checked in by Faria Nassiri Mofakham, 6 years ago |
For keeping track (Shapes added, several changes to Product, Portfolio, Main, and GUI classes; contains some errors) to return back after some more changes.
|
File size:
854 bytes
|
Line | |
---|
1 | package negotiator.onetomany;
|
---|
2 |
|
---|
3 | import java.awt.Color;
|
---|
4 |
|
---|
5 | public class Main
|
---|
6 | {
|
---|
7 | private Portfolio portfolio;
|
---|
8 |
|
---|
9 | public Main()
|
---|
10 | {
|
---|
11 | // Product redProduct = new Product("Red");
|
---|
12 | // Product greenProduct = new Product("Purple");
|
---|
13 | // Product blueProduct = new Product("Blue");
|
---|
14 |
|
---|
15 | // Product redProduct = new Product(Color.red.toString());
|
---|
16 | // Product greenProduct = new Product(Color.pink.toString());
|
---|
17 | // Product blueProduct = new Product(Color.blue.toString());
|
---|
18 |
|
---|
19 | Product redProduct = new Product(Color.red);
|
---|
20 | Product greenProduct = new Product(Color.pink);
|
---|
21 | Product blueProduct = new Product(Color.blue);
|
---|
22 |
|
---|
23 | portfolio = new Portfolio();
|
---|
24 |
|
---|
25 | portfolio.addProduct(redProduct);
|
---|
26 | portfolio.addProduct(greenProduct);
|
---|
27 | portfolio.addProduct(blueProduct);
|
---|
28 | }
|
---|
29 |
|
---|
30 | public Portfolio getPortfolio()
|
---|
31 | {
|
---|
32 | return portfolio;
|
---|
33 | }
|
---|
34 |
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.