aspose file tools
The moose likes Beginning Java and the fly likes can I use an array?, how to create vertical lines? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "can I use an array?, how to create vertical lines?" Watch "can I use an array?, how to create vertical lines?" New topic
Author

can I use an array?, how to create vertical lines?

Nancy Bradley
Ranch Hand

Joined: Feb 25, 2004
Posts: 32
I have an assignment where I should write an abstract class which will be the base to calculate some points of a competition. The points will be assigned different depending on weather the person is a boy,girl,man or woman.
I have 2 boys, 3 women,2 girls and 2 men. I just type the number of item each one collected, but I was wondering if there is a better way of doing it, maybe with an array for each group? Can I have it in the test class,or has to be in each individual class?
Also I am suppose to create a table how can I get the vertical lines?
Thank you in advance for your help
Nancy B

[ edited to break really long lines and to remove the evil tab character -ds ]
[ April 19, 2004: Message edited by: Dirk Schreckmann ]
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673

Also I am suppose to create a table how can I get the vertical lines?

Have a look at JTable in Thw Swing Tutorial

Think about think the above code the extends keyword denotes an "is a" relationship. I find it difficult to think of people as rewards. A man, boy, woman and girl are all types of Person. A Person would have a name, sex, age e.t.c
The implements keyword denotes a "has a" relationship, therefore a person could have a reward for completing a task. For me that means an interface for the reward system.
Keep asking questions and I'm sure you will find the answer here.
Regards
Nigel
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Also I am suppose to create a table how can I get the vertical lines?
For console output, you could make use of the | character. And the + character might work well for places where a vertical line meets a horizontal line.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Nancy Bradley
Ranch Hand

Joined: Feb 25, 2004
Posts: 32
I think I got the table going.
Thanks a lot
Nancy B
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can I use an array?, how to create vertical lines?
 
Similar Threads
Story Time
static modifier
abstract class
avoiding a recursive deadlock
Please Help I am lost!!!