Question: Write a program in java. This week we will be trying out a different activity. You will be working as a group to learn the

 Write a program in java. This week we will be trying

Write a program in java.

This week we will be trying out a different activity. You will be working as a group to learn the basics of using Standard Draw. Standard Draw is a small library that allows you to help draw graphics in Java. We will then extend the exercise into thinking about how an Object Oriented design approach can help us manage the problems that arise. You can find examples of using Std Draw on Moodle called StdDraw Basic and Graphics Examples (more complex) 1. First, I would like your group to work out how to draw a house using StdDraw. You will need to set up the canvas, work out the coordinate system, and draw several shapes. I have included an example house for you to use. 2. Once you have the house drawn, I want you to design a new object of type House. A House object will contain the following: Variables: int anchorx, int anchory // these will be the "base position" or current position of the House. All other elements will be calculated relative to the anchor point. methods: a. A constructor that accepts no arguments and just creates a house with default settings (of your choosing). b. A draw() method which actually draws the house to the window, with the anchor point at the current position. C. a setPosition method which sets the starting position of the house (the anchor position) This week we will be trying out a different activity. You will be working as a group to learn the basics of using Standard Draw. Standard Draw is a small library that allows you to help draw graphics in Java. We will then extend the exercise into thinking about how an Object Oriented design approach can help us manage the problems that arise. You can find examples of using Std Draw on Moodle called StdDraw Basic and Graphics Examples (more complex) 1. First, I would like your group to work out how to draw a house using StdDraw. You will need to set up the canvas, work out the coordinate system, and draw several shapes. I have included an example house for you to use. 2. Once you have the house drawn, I want you to design a new object of type House. A House object will contain the following: Variables: int anchorx, int anchory // these will be the "base position" or current position of the House. All other elements will be calculated relative to the anchor point. methods: a. A constructor that accepts no arguments and just creates a house with default settings (of your choosing). b. A draw() method which actually draws the house to the window, with the anchor point at the current position. C. a setPosition method which sets the starting position of the house (the anchor position)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!