Implement the given class hierarchy inside of a module

Assignment Help Computer Engineering
Reference no: EM131273001

Assignment

Implement the following class hierarchy inside of a module file called polygon.py.

Polygon

Triangle Quadrilateral Pentagon Hexagon Octagon

Isosceles Tri Equilateral Tri Rectangle

Square

Each class should be able to calculate the area and perimeter for an object of that class.

Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and perimeters.

Additional notes

All data members should be private and accessed through getters and setters.

Assume that the pentagons, hexagons and octagons are regular.

Assume that the quadrilaterals are cylic.

Do not use the regular polygon area formula for anything but pentagons, hexagons and octagons.

Do not use Brahmagupta's formula for anything but the cyclic quadrilaterals.

Regular polygon constructors should take a single argument for their side length.

The isosceles triangle constructor should take a base and a height.

Other irregular polygon constructors should take an argument for each side.

You should check for nonsensical input, at the very least, check for positive entries.

To open files for reading and writing, review the open function.

To parse the strings in the input file, look at string methods like split.

To read command line arguments, look at the standard sys module and argv.

To write a set number of decimal places, use the string method format.

Reference no: EM131273001

Questions Cloud

Write a c program that adds two input values : Introduction to C programming: Write a C program that adds two input values and outputs the sum and product on the screen.
Write-downs accounted for the remainder : The company's financial statement footnotes indicated that expected employee separation payments amounted to $16.8 million and that fixed asset write-downs accounted for the remainder. Nickolas had never before incurred restructuring charges. At t..
Write a program with three functions upper lower and reverse : Write a program with three functions: upper, lower, and reverse. The upper function will accept a pointer to a string or C-string as an argument. It will step through each character in the string converting it to uppercase.
Separate organizational responsibilities for mitigation : Discuss and support your response to the following question: "Should we separate organizational responsibilities for mitigation, preparedness, response, and recovery" (Harrald, 2012, p. 187)? Is this already done?
Implement the given class hierarchy inside of a module : Implement the following class hierarchy inside of a module file called polygon.py. Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and peri..
List the vulnerabilities of each protection you selected : List the vulnerabilities of each protection you selected. Draw the necessary network cables between access points and switches using the drawing tools in Microsoft Word.
Suggest three techniques to overcome the given challenges : One of your developers tells you that it would be way too complicated to add voice recognition into the app. Suggest three techniques to overcome the challenges of implementing natural language into interface designs.
Marketing plan-sales strategy : Write the three to five (3-5) page Marketing Plan & Sales Strategy section of your business plan, in which you:
Explain the pico elements : Conduct a library search and locate one scholarly article that addresses the topic you have selected.- Explain the PICO(T) elements, and provide a full reference of the article you selected.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What are the possible issues if your os automatically mounts

What is the significance of the Chain of Custody PDF form from Adepto? Why is it needed? What are the possible issues if your OS automatically mounts your drive prior to creating your forensic duplicate?

  Identify three ways in which your confidentiality

Identify three ways in which your confidentiality and privacy can be breached when your computer is connected to the Internet. b. Explain what firewalls are and give a type of firewall in use.

  Construct and make a list of potential entities

The Jefferson Dance Club teaches social dancing and offers both private and group lessons. Jefferson charges $45 per hour per student (or couple) for a private lesson and charges $6 per hour per student for a group lesson.

  Create a query that includes instructors first names last

perform the following steps in mysqlcreate the tables and relationships from the database design discussed in lab

  Context free language

Let L1 be the regular language and L2 be the context-free language, both described over the same alphabet Σ. a) Is L1∩L2 always regular? Explain your claim.

  Illustrate the differences and similarities between the

write a 200- to 300-word short-answer response to the followingwhat are the differences and similarities between

  Change the image to a black-to-green scale image

Call a method that will change the image to a "black-to-green scale" image - Call a method that will change the image to a version of a green scale image.(green to white).

  Calculate button finds charges and displays them in controls

Job Information FormThe Job Information form must have text boxesfor the user to enter the job number, customer name, amount charged forparts, and the hours of labor. Include labels and text boxes for Parts,Labor, Subtotal, Sales Tax, and Total.

  Discuss the changes that were necessary

Nazca Cinemas is a small movie theater that would like you to create a movie scheduling database system for them. The theater has four rooms (screens).

  Question1 generate a mockup of the page to show how it will

question1. generate a mockup of the page to show how it will look. this can be done in a number of ways - you could use

  What is the aim of web accessibility standards

recognize three important commandments to be followed in web design, and explain why they are important.

  Expert systems or neural networks

Could you please select and justify which of the decision technology/approaches, expert systems or the neural networks, which must be used and how your solution would work.

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