Kyle Richardson

Greenhorn

Posts: 1

posted 4 years ago

Hey everyone,

My first post, so be gentle. I looked for guidelines on posting, but didn't find any, so I hope I'm doing this correctly. I've found the moose time and time again as I Google for help as I've been learning Java for college. I thought I could take it up quickly since I did well with Fortran in 99, but I've been struggling. This forum has been a source that has helped me time and time again. Now I'm hoping that someone can help me with deciphering the instructions for one of my assignments. It is as follows:

Program 5 Implement the following geometry class with respect to the sixth digit of your id without any graphics. Constructor, parse and toString methods, accessor, mutator as well as move(float x, float y), doubleSize(), and halfSize(). Print out appropriate output for each method to prove that it works. Same turn-in requirements as Program 1.

SIXTH Digit of Student ID Figure

0 point

1 line

2 square

3 rectangle

4 triangle

5 circle

6 open arc of circle

7 closed arc of circle

8 pie slice of circle

9 happy face

The sixth digit of my student id is 1, so I'm figuring I need to use the line class, but I'm unsure how I'm suppose to do this without graphics. I'm also at a complete loss for the second part of the instructions. I've asked my professor for help, but his answers are incomplete and cryptic. Can anyone make heads or tails of this? I need to complete this as the following assignment requires the result:

Program 6 Implement a sub-class of your class in Program 5 that provides two colors and a draw() method. Test your classes with a GUI front end that responds to key input as follows (n new object in center of screen) (d double size of last object drawn) (h half size of last object drawn) (m move last object random direction and distance) (c change two colors of last object) and (e erase screen).

Any and all assistance is greatly appreciated

My first post, so be gentle. I looked for guidelines on posting, but didn't find any, so I hope I'm doing this correctly. I've found the moose time and time again as I Google for help as I've been learning Java for college. I thought I could take it up quickly since I did well with Fortran in 99, but I've been struggling. This forum has been a source that has helped me time and time again. Now I'm hoping that someone can help me with deciphering the instructions for one of my assignments. It is as follows:

Program 5 Implement the following geometry class with respect to the sixth digit of your id without any graphics. Constructor, parse and toString methods, accessor, mutator as well as move(float x, float y), doubleSize(), and halfSize(). Print out appropriate output for each method to prove that it works. Same turn-in requirements as Program 1.

SIXTH Digit of Student ID Figure

0 point

1 line

2 square

3 rectangle

4 triangle

5 circle

6 open arc of circle

7 closed arc of circle

8 pie slice of circle

9 happy face

The sixth digit of my student id is 1, so I'm figuring I need to use the line class, but I'm unsure how I'm suppose to do this without graphics. I'm also at a complete loss for the second part of the instructions. I've asked my professor for help, but his answers are incomplete and cryptic. Can anyone make heads or tails of this? I need to complete this as the following assignment requires the result:

Program 6 Implement a sub-class of your class in Program 5 that provides two colors and a draw() method. Test your classes with a GUI front end that responds to key input as follows (n new object in center of screen) (d double size of last object drawn) (h half size of last object drawn) (m move last object random direction and distance) (c change two colors of last object) and (e erase screen).

Any and all assistance is greatly appreciated

posted 4 years ago

Put it this way: Even if you were using graphics, you'd have to define a data structure that contains all the information needed to characterize a line, right? You code wouldn't consist of an actual, physical line, would it?

You must have learned at least a couple of ways to describe a line in an algebra class prior to college, so start with one of those.

Kyle Richardson wrote:The sixth digit of my student id is 1, so I'm figuring I need to use the line class, but I'm unsure how I'm suppose to do this without graphics.

Put it this way: Even if you were using graphics, you'd have to define a data structure that contains all the information needed to characterize a line, right? You code wouldn't consist of an actual, physical line, would it?

You must have learned at least a couple of ways to describe a line in an algebra class prior to college, so start with one of those.