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

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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