https://github.com/paiv/oop_study
Practical OOP in different languages
https://github.com/paiv/oop_study
c cpp java javascript oop-principles python ruby scala swift
Last synced: 3 months ago
JSON representation
Practical OOP in different languages
- Host: GitHub
- URL: https://github.com/paiv/oop_study
- Owner: paiv
- Created: 2017-01-28T22:34:07.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-03-14T19:13:04.000Z (over 5 years ago)
- Last Synced: 2025-06-04T23:36:35.393Z (about 1 year ago)
- Topics: c, cpp, java, javascript, oop-principles, python, ruby, scala, swift
- Language: C
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OOP Study
=========
Task
----
Make an app that controls two devices, `Device A` and `Device B`,
via corresponding controllers, `Controller A` and `Controller B`.
There might be many vendors for `Device A`, as well as for `Device B`.
Spec
----
Device A:
- op1(int)
- op2(int): int
Device B:
- op1(int)
- op2(int, int): int
Controller A:
- foo(param): device.op1(param * param)
- run(param): device.op2(param)
Controller B:
- foo(param): device.op1(param * param)
- run(param): device.op2(param, param)
App:
- controllerA.foo(13)
- controllerB.foo(15)
- controllerB.run( controllerA.run(42) )