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

  Express and give an example of a web database.

Explain the difference between system design and system analysis.

  Assume the network is a packet-switched datagram network

discuss sending a file of F bytes over a path of Q links. Each link transmits at R bps. The network is lightly loaded so that there are no queuing delays. Propagation delay on each link is Tp on average.

  Make a basic web page using html tags

build a basic Web page using HTML tags. The page should present information about a company/organization or about a profession.Please include all Web site files.

  Sha-256 and rc4

SHA-256 (with 256-bit output) is more resistant to the attacks based on birthday paradox than SHA-1. Key reuse is deadly for the stream ciphers such as RC4.

  A system employs the go-back-n arq protocol with a window

a system uses the go-back-n arq protocol with a window size of 7. if each packet carries 1000 bits of data how long

  How would you propose the update to star topology

How would you propose the update to Star topology

  What range of distances does bernie have a higher data rate

The dog can travel to your side, wherever you may be, at 18 km/hour. For what range of distances does Bernie have a higher data rate than a transmission line whose data rate (excluding overhead) is 150 Mbps.

  Why a foreign key must match another table primary key

Word's Save as Web Page Command, by default, saves the document in a format known as?

  Why did company select a project manager from organization

Why did the company select a project manager from within the organization? Would it have been better to hire an external professional project manager to coordinate the project? Why or why not?

  Utilizing the rsa protocol encrypt and decrypt messages

You are asked to hand-turn the RSA protocol in order to encrypt and decrypt the messages (utilizing smaller numbers than are used in the practice, so that calculations may be done through the hand).

  Latter discloses the password length

Not having the computer echo the password is safer than having it echo an asterisk for each character typed, since the latter discloses the password length to anyone nearby who can see the screen.

  How to create a html website

Create a HTML website using the following guidance.

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