Interpret and implement algorithms and program code

Assignment Help Other Subject
Reference no: EM132739337

Assessment - Interactive Drawing

TASK
In this assignment you will use turtle graphics to create an interactive menu-based drawing application.

The application will initially show an empty drawing screen and present the user with the following main menu:

[L]ine
[A]rc

[T]ext [S]ettings [Q]uit

The user selects the menu command by entering the letter (case insensitive). The following prompts will depend on the selected option. For example, the following are the prompts for the Line command:

Line > x1 (default current x coordinate):

Line > y1 (default current y coordinate):

Line > x2:

Line > y2:

After the Line parameters are accepted, the program should draw a line on the drawing screen, store the current x and y coordinates, and return back to the main menu. Use the same approach for other commands.

The Arc command will accept two parameters: radius and angle. It will draw a partial circle with those parameters.

The Text command will accept four parameters: content, size, x and y coordinates. It will write the entered content on the screen with specified size at the specified coordinates.

The Settings command will show the following prompts:

Settings > Pen colour (default no change):

Settings > Pen thickness (default no change):

The entered values will apply to any future drawing commands.

Constraints
1. You must create a module called easyshape.py that contains at least the following
functions:
line(x1, y1, x2, y2) text(content, size, x, y) arc(radius, angle) settings(colour, thickness)
2. You must also use global variables for the colour and thickness values, as well as the current x and y coordinates.
3. In your main program, you must import the module easyshape. You must not import any modules other than turtle and your own created modules.

Your assignment should consist of following tasks.

Task 1
Draw a flowchart of your menu handling algorithm. You can abstract the defined functions using function symbols, but the main flowchart should provide sufficient level of details for the logic of your algorithm.

You can draw the flowcharts with a pen/pencil on a piece of paper and scan it for submission, as long as the handwriting is clear and legible. However, it is strongly recommended to draw flowcharts using a drawing software.

Task 2
Select four sets of test data that will demonstrate the 'normal' operation of your program; that is, test data that will demonstrate what happens when a valid input is entered. Select three sets of test data that will demonstrate the 'abnormal' operation of your program. Please note that for this application, user input includes mouse clicks as well as keyboard button presses.

Set out test results in a tabular form as follows. It is important that the output listings (i.e., screenshots) are not edited in any way.

Task 3
Implement your program in Python. Comment on your code as necessary to explain it clearly. Run your program using the test data you have selected and complete the final column of test data table above.
Your submission will consist of:
1. Your algorithm through flowchart/s
2. The table recording your chosen test data and results
3. Source code for your Python implementation
Thus your directory for Assignment will at least contain two or three files (depending on whether you put the flowchart and the test table in the same file).

It is critically important that your test runs are unmodified outputs from your program, and that these results should be reproducible by the marker running your saved .py python program.

RATIONALE
This assessment task will work towards assessing the following learning outcome/s:
• be able to analyse the steps involved in a disciplined approach to problem-solving, algorithm development and coding.
• be able to demonstrate and explain elements of good programming style.
• be able to identify, isolate and correct errors; and evaluate the corrections in all phases of the programming process.
• be able to interpret and implement algorithms and program code.
• be able to apply sound program analysis, design, coding, debugging, testing and documentation techniques to simple programming problems.
• be able to write code in an appropriate coding language.


PRESENTATION
You have to prepare and present all source code, test data table, and flowchart/s separately and include them all in a single MS Word file identified by your name. See the 'Requirements' section below. The Python source code you write should be saved with a name such as ITC558assignment2YourName.py and then include a copy of it as text in the MS Word file named ITC558assignment2YourName.docx.

The other parts of the assignment (such as your flowchart/s and your table of test data) should be included in the same MS Word file and save as ITC558assignment2YourName.docx.

It is critically important that your test runs are unmodified outputs from your program, and that these results should be reproducible by the marker running your saved ITC558assignment2YourName.py python program.

REQUIREMENTS
You have to save all the parts of the assignment (as described under 'Presentation' above) into a single MS Word document identified by your name as outlined in the section on presentation.
Failure to adhere to these requirements may disqualify the submission for marking.
Submit your complete assignment in MS Word format to Turnitin and insert your program source code as an object to your MS Word document (The subject lecturer will explain to you how to insert the object to your MS Word document).

Attachment:- Interactive Drawing.rar

Reference no: EM132739337

Questions Cloud

Normal distribution with mean : An inventory manager at Gap, Inc. is trying to determine how many units of a new tank top to stock for the coming season. The product costs $22 and sells
The single-server waiting line system : Poultry Processing processes chickens for fast food restaurants. The chickens arrive from the farms on trucks, in cages, at a rate of 8 trucks per hour accordin
Perspective of supply chain design : From the perspective of supply chain design, what capabilities should disaster relief supply chains have?
Discuss about the composition of national populations : Methods which may be used to project the future size and composition of national populations and national labour forces, methods which may be used to derive.
Interpret and implement algorithms and program code : Apply sound program analysis, design, coding, debugging, testing and documentation techniques to simple programming problems.
Contrast the three distinct types of control : 1. Why is controlling a very important management function?
Compare equal employment opportunity and affirmative action : Compare and contrast equal employment opportunity, affirmative action, and managing diversity programs. In your opinion, can they occur simultaneously?
Intangible benefits of increased customer service : Detail specific consideration regarding customer satisfaction levels and costs. Discuss the intangible benefits of increased customer service and increased cost
What is the materials quantity variance : Assume that the standard cost to make one unit of product includes 15 units of raw materials at a price of $3 per unit. What is the materials quantity variance

Reviews

Write a Review

Other Subject Questions & Answers

  Consider the course outcomes and module learning objectives

Consider the Course Outcomes and Module Learning Objectives as your lens when responding to the discussion prompt and to other students' posts.

  Difference between being a manager and being a leader

In your opinion, what is the difference between being a manager and being a leader? Read research findings by Kabacoff (1998) that, although men and women.

  Dealing with consumer problems is an imperative component

dealing with consumer problems is an imperative component of professional customer support. list various behavioral and

  Compute their z-spreads over the Treasury spot rate curve

Z-spreads: Select two corporate bonds for the same company. Compute their z-spreads over the Treasury spot rate curve, as calculated in Question 1

  Evaluate bureaucracy as coequal branch of federal government

Using a news article from the last four weeks that demonstrates this power, evaluate the bureaucracy as co-equal branch of the federal government. Why or why isn't it a "fourth branch"?

  Discussing a workable plan to improve the emotional skills

Develop a 1,400- to 1,750-word paper discussing a workable plan to improve the emotional skills and competencies of people in one of the team member's place.

  Why topic would be of interest to public policy advocates

Compose two short summaries of how or why this topic would be of interest to public policy advocates and business executives. Keep in mind that you choose one.

  Find a press release from the board of governors

Find a press release from the Board of Governors of the Federal Reserve System, dated December 16, 2009, which discusses the decisions of the Federal Open Market Committee (FOMC) for that date.

  List the areas to be explored by the mission

List the areas to be explored by the mission. What challenges did the team encounter? Explain how the data was collected and what modern technologies were used. Explain whether the explorative mission was successful in its findings.

  Wire delays are negligible

In the diagram above, the inverter and the AND-gates labeled 1 and 2 have delays of 9, 10 and 12 nanoseconds, respectively. Wire delays are negligible. For certain values of a and c, together with a certain transition of b, a glitch (spurious outp..

  Write a paper about the art melchior d''hondecoeter dutch

Write a 1200 word paper about Melchior d'Hondecoeter Dutch, 1636-1695. A formal analysis is the fundamental form of writing about art.

  Create a section box to extract a segment from all direction

Create a "section box" to extract a 12'-16' high segment from all three directions, X, Y and Z. Create an axon view of each in Rhino.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd