Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

During the previous lessons milestone, you wrote code to draw at least the sky, clouds, and ground of an outdoor scene. During this lesson, you

During the previous lessons milestone, you wrote code to draw at least the sky, clouds, and ground of an outdoor scene. During this lesson, you will write code that draws the remaining objects in your scene. Your program can draw any outdoor scene that you like as long as it meets these requirements:

The scene must be outdoor and include part of the sky.

The sky must have clouds.

The scene must include repetitive objects, such as blades of grass, trees, leaves on a tree, birds, flowers, insects, fish, pickets in a fence, dashed lines on a road, buildings, bales of hay, snowmen, snowflakes, or icicles.

Your program must be divided into functions such as draw_sky, draw_cloud, draw_ground, draw_bird, draw_flower, draw_insect, draw_fish, or draw_snowman. Each repetitive object in your scene should be drawn by a function that your program calls repeatedly, once for each repeated object. For example, your program could include a function named draw_leaf that your program repeatedly calls to draw each leaf on a tree at a different location.

As you write your program, write it so that it draws objects in the order of farthest away to nearest. For example, you program should draw the sky first, then clouds, then the ground, then trees, then insects in the trees. Be creative.

If your program fulfills the requirements for this assignment as described in the previous prove milestone and the Assignment section above, your program will earn 93% of the possible points. In order to earn the remaining 7% of points, you will need to write your drawing functions so that they correctly use parameters.

Consider the following draw_pine_trees function that draws three trees. It correctly draws three trees. However, it has only one parameter (canvas) but should have more. With only one parameter, the draw_pine_trees function is not easily reusable because it uses hard coded numbers for the coordinates at lines 5, 6, 10, 11, 15, and 16. Because of the way that the draw_pine_trees function is written, it can draw only three pine trees, and it will always draw them at the same locations. What if we decide to change the width and height of the scene? The draw_pine_trees function will draw pine trees in the same locations as before, but these may be the wrong locations in a larger scene.

This criterion is linked to a Learning OutcomeProgram draws an outdoor scene in a window

10 pts

Complete

Program draws any outdoor scene

5 pts

Developing

Program draws anything that is not an outdoor scene

0 pts

Missing

Program doesn't draw anything

10 pts

This criterion is linked to a Learning OutcomeScene includes part of the sky

10 pts

Complete

Scene includes part of the sky

5 pts

Developing

Program contains code that incorrectly attempts to draw the sky

0 pts

Missing

No attempt made to draw any part of the sky

10 pts

This criterion is linked to a Learning OutcomeScene includes clouds in the sky

10 pts

Complete

Scene includes two or more clouds

5 pts

Developing

Scene contains only one cloud or program contains code that incorrectly attempts to draw clouds

0 pts

Missing

No attempt made to draw clouds

10 pts

This criterion is linked to a Learning OutcomeScene includes part of the earth's surface (ground, snow, or water)

10 pts

Complete

Scene includes part of the earth's surface

5 pts

Developing

Program contains code that incorrectly attempts to draw the earth's surface

0 pts

Missing

No attempt made to draw the earth's surface

10 pts

This criterion is linked to a Learning OutcomeBesides clouds, program drawn scene includes objects that are repeated, such as trees, blades of grass, fish, birds, or fence pickets.

10 pts

Complete

Besides clouds, program drawn scene includes objects that are repeated, such as trees, blades of grass, fish, birds, or fence pickets

5 pts

Developing

Scene includes elements besides clouds, but none of the other elements are repeated in the scene

0 pts

Missing

No attempt made to draw repeated elements besides clouds

10 pts

This criterion is linked to a Learning OutcomeProgram imports functions from the Draw 2D library

3 pts

Complete

Program imports functions from the Draw 2D library

1.5 pts

Developing

Program includes an incorrect attempt to import the functions from the Draw 2D library

0 pts

Missing

No attempt made to import anything from the Draw 2D library

3 pts

This criterion is linked to a Learning OutcomeProgram calls functions in the Draw 2D library

10 pts

Complete

Program calls functions in the Draw 2D library

5 pts

Developing

Program uses any library except Draw 2D, such as turtle graphics, to draw something

0 pts

Missing

Program doesn't draw anything

10 pts

This criterion is linked to a Learning OutcomeProgram is divided into user-defined functions

10 pts

Complete

Including main, program has at least four user-defined functions: main and three others

5 pts

Developing

Including main, program has one, two, or three user-defined functions

0 pts

Missing

Including main, program has only one or zero user-defined functions

10 pts

This criterion is linked to a Learning OutcomeUser-defined functions in the program, except main, have parameters. (Because main normally has no parameters, main is excluded from this grading criteria.)

10 pts

Complete

Excluding main, all user-defined functions have at least two parameters: canvas and one other

5 pts

Developing

Excluding main, some user-defined functions have only one or zero parameters

0 pts

Missing

All user-defined functions have no parameters

10 pts

This criterion is linked to a Learning OutcomeEach instance of a repeated element is drawn by calling a function once. (The objective is for students to understand they can write a function once and call it many times to save themselves effort.)

10 pts

Complete

Scene includes repeated elements, and each instance of a repeated element is drawn by calling a function once. In other words, program includes a function like draw_tree which is called once for each tree in the scene and not draw_trees which draws all trees with a single call.

5 pts

Developing

Scene includes repeated elements. However, one or more types of the repeated elements are drawn with a single function call. In other words, program includes a function like draw_trees which is called once and draws all trees in the scene.

0 pts

Missing

No attempt made to draw any repeated elements.

10 pts

This criterion is linked to a Learning OutcomeCreativity

7 pts

Exceeded Requirements

All objects are drawn with functions defined once, but when repeated, are called with different arguments to alter the size and/or locations.

0 pts

Did Not Exceeded Requirements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions