I gang

Python Exercise with object-oriented code and design patterns

Clear, simple and elegant object-oriented code is important. Avoid the minimum possible solution; Consider maintainability and extensibility by the demonstration of appropriate abstractions. A solution using the fewest possible lines of code is not the best option.

Part 1. Visitor

Create an interface or abstract base class 'Shape'.

Implement three concrete Shapes: 'Circle', 'Rectangle', 'Triangle'.

Apply the visitor pattern to your data model.

Write an AreaVisitor that computes the area of the shapes.

Write a program that makes arbitrary instances of the data model and applies the AreaVisitor.

Part 2. Multi Power Point

A power switch is required that can turn on or off any number of appliances. An appliance is for example a Blender, a Toaster, or an Oven.

Other programmers have already written those appliances and you can't change their source code (e.g. to require them all to implement a particular interface), or extend from those classes.

Fortunately, each such appliance already has two methods to turn its particular appliance on and off. Unfortunately, all such methods were written by different people and have different names (examples: [url removed, login to view](), [url removed, login to view](), [url removed, login to view]()).

Write three third party appliances and put them in a separate package. It should be visible from the output of each appliance whether it is turned on or off (in its third-party vocabulary).

Make a representation of a Multi Power Point. You can plug in as many appliances as you wish and turn them on and off all at once, by turning the multi power point on() and off(). Consider how you would model a real multi power point and make appropriate design choices.

Write a program that demonstrates your Multi Power Point​.

Part 3. Paper Scissors Rock

Paper Scissors Rock is a game for two players. Each player simultaneously opens his/her hand to display a symbol:

Fist equals rock,

Open hand equals paper,

Showing the index and middle finger equals scissors.

The winner is determined by the following schema:

paper beats (wraps) rock,

rock beats (blunts) scissors,

scissors beats (cuts) paper.

Write a program that plays Paper Scissors Rock between the computer and a real player.

You should be able to play the game n times before the program exits.

Good option is to generalize from these requirements to demonstrate clear, maintainable and extensible code.

Færdigheder: Python

Se mere: strategy design pattern java code example, python design patterns, object oriented programming in python, object oriented design patterns, design patterns elements of reusable object oriented software pdf, object oriented design patterns codeigniter, design pattern android code, python workflow design pattern, code hangman game object oriented programming, using design pattern code igniter, different types design patterns dot net, web2 design html code, website design zip code, j2ee spring design pattern, design pattern vrp problems, design patterns car insurance project, spring jms integration design pattern, data import design patterns, ebay listing design html code, design pattern developing game php, service provider design pattern telecommunication, jsf web design patterns, eclipse update site j2ee design patterns, sofa design pattern flash seo, javajspjdbc javascript css design patterns mvc spring

Om arbejdsgiveren:
( 1 bedømmelse ) Malaga, Spain

Projekt-ID: #14070797

Tildelt til:

roboticres

Sure, it sounds good. I am expert on Python. I am post-doc researcher at university in PAris. I can write this program easly.

€30 EUR på 1 dag
(0 bedømmelser)
0.0

7 freelancers are bidding on average €49 for this job

schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex Mere

€150 EUR på 1 dag
(4 bedømmelser)
4.1
€66 EUR in 3 dage
(3 bedømmelser)
1.8
junaidkhalid92

Dear Hiring Manager, here's our official site please have a look [url removed, login to view] Thank you for this wonderful opportunity. Today Your job posting has caught my attention because I’m a looking for Mere

€29 EUR på 1 dag
(0 bedømmelser)
0.0
€23 EUR in 3 dage
(0 bedømmelser)
0.0
Jysan

Hey client, I am a professional developer having a great passion for programming. I have good concepts about design pattern with industry [url removed, login to view] for your reply.

€23 EUR på 1 dag
(0 bedømmelser)
0.0
ankitk50777

Hey there, I have understood the problem statements mentioned by you. I can do this in 2 days time. Regards Ankit

€23 EUR på 1 dag
(0 bedømmelser)
0.0
jayanta678

I believe that this project is suitable for me because u have the required skillset to complete the given task

€23 EUR på 1 dag
(0 bedømmelser)
0.0