-
Notifications
You must be signed in to change notification settings - Fork 0
/
workstation.py
61 lines (54 loc) · 1.74 KB
/
workstation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#########################################
# This project is a lab assignment #
# for the Essential Skills Module. #
# University of Amsterdam #
# MSc in System and Network Engineering #
# Nick Trintafyllidis. #
# Use it as you wish :) #
#########################################
import keyboard
import mouse
import monitor
class Workstation(object):
def __init__(self):
self.name = "None"
self.make = "Dell"
self.model = "Optiplex 7010"
self.color = "Black"
self.os = "Ubuntu 14.10"
self.connection = "None"
self.owner = "Nobody"
self.monitor1 = monitor.DellMonitor()
self.monitor2 = monitor.DellMonitor()
self.keyboard = keyboard.DellKeyboard()
self.mouse = mouse.DellMouse()
self.monitor1.connect("VGA")
self.monitor2.connect("VGA")
self.keyboard.connect("USB")
self.mouse.connect("USB")
def printinfo(self):
print "*****"
print "Name:" + self.name
print "Make:" + self.make
print "Model:" + self.model
print "Color:" + self.color
print "Connection:" + self.connection
print "Operating System:" + self.os
print "Owner:" + self.owner
print "*****"
def printall(self):
self.printinfo()
print "Monitor 1:"
self.monitor1.printinfo()
print "Monitor 2:"
self.monitor2.printinfo()
print "Keyboard:"
self.keyboard.printinfo()
print "Mouse:"
self.mouse.printinfo()
def connect(self, connection):
self.connection = connection
def assign(self, owner):
self.owner = owner
def name_it(self, name):
self.name = name