示例#1
0
    def __init__(self, person):
        #初始化界面,tkinter展开画布Canvas
        self.pindex = 0

        self.personlist = person
        self.bed = hospital.Hospital()

        self.root = Tk()
        self.root.title('virus broading model')
        self.root.geometry('1000x1000+500+200')
        self.cv = Canvas(self.root, height=1000, width=1000, bg='black')
        self.h = hospital.Hospital()
示例#2
0
def eject():
    clinica = hospital.Hospital()
    clinica.crearPaciente("Andres", "1024", "pediatria")
    clinica.crearPaciente("Camila", "2135", "geriatria")
    clinica.crearPaciente("Carlos", "6235", "neumologia")
    clinica.crearPaciente("Daniel", "0831", "psiquiatria")
    clinica.crearPaciente("Valentina", "1025", "oftalmologia")
    clinica.crearPaciente("Sandra", "1025", "traumatologia")
    clinica.atenderPaciente()
    clinica.atenderPaciente()
    clinica.atenderPaciente()
    clinica.atenderPaciente()
示例#3
0
from math_dojo import MathDojo
import call_center
import hospital
from underscore import Underscore

bmx = Bike(100, "30 mph")
print bmx.__repr__()
toyota = Car(20000, "120 mph", "Full", 50000)
print toyota.__repr__()
mouse = Product(10, "Computer Mouse", "5 ounces", "Logitech", 5)
print mouse.__repr__()
electronics = Store("San Jose, CA", "Me Me")
print electronics.__repr__()
hamster = animal.Animal("Hammy", 50)
print hamster.__repr__()
spot = animal.Dog()
print spot.__repr__()
maggie = animal.Dragon()
print maggie.__repr__()
al = MathDojo()
print al.__repr__()
call1 = call_center.Call("Aaron", "268-347-1484", 911, "Complaint")
print call1.__repr__()
center1 = call_center.CallCenter()
print center1.__repr__()
patient1 = hospital.Patient(135, "Deborah", "sulfonamides")
print patient1.__repr__()
general = hospital.Hospital("BB General", 100)
print general.__repr__()
_ = Underscore()
print _.__repr__()
示例#4
0
file = open("logs.txt", 'w')
file.close()
doctors = []
nurses = []

doctor1 = doctor.Doctor('Александр', 'Иванов', 35, 1, "Хирург")
doctor1.list_update({11112: 'Коннов'})
doctor1.list_update({11113: 'Иванов'})
doctor1.list_update({11114: 'Смирнов'})
doctor2 = doctor.Doctor('Максим', 'Смирнов', 30, 2, 'Терапевт')
doctor2.list_update({11115353: 'Ивашин'})

nurse1 = nurse.Nurse('Анна', 'Иванова', 20, 1, 'Хирургия')
nurses.append(nurse1)
nurse1.update_work_schedule({'понедельник': '9:00-15:00', 'Среда': '15:00-21:00'})
nurse2 = nurse.Nurse('Елена', 'Кудоявцева', 22, 2, 'Гинекология')
nurses.append(nurse2)
nurse2.update_work_schedule({'Вторник': '9:00-15:00', 'Пятница': '9:00-15:00'})

hospital1 = hospital.Hospital('Больница №1', 'Гагарина 7', doctors, nurses)
hospital1 + doctor1
hospital1 + doctor2
hospital1.write_in_file()
doctor3 = doctor.Doctor('Анна', 'Онищенко', 30, 3, 'Гинеколог')
hospital1 + doctor3

with open('doctors_nurses.pickle', 'wb') as f:
    pickle.dump([doctors,nurses], f)


示例#5
0
import product
import mathDojo
import car
import animal
import hospital

if __name__ == "__main__":
    item1 = product.Product(10, "cat toy", 5, "Fisher", 5)
    print item1
    target = store.Store([], "sunnyvale", "mr T")
    print target

    md = mathDojo.MathDojo()
    md.add(2).add(2, 5).subtract(3, 2)
    print md

    car1 = car.Car(2000, 35, 'Full', 15)
    print car

    animal1 = animal.Animal("Zebra", 100)
    dragon = animal.Dragon("Eragon")
    dog = animal.Dog("Corgi")
    print animal1
    print dragon
    print dog

    patient1 = hospital.Patient(1, "Dinosaur Rex", "peanuts")

    hospital = hospital.Hospital("General", 10)
    print patient1
    print hospital
示例#6
0
cc1.sort().info()
print cc1

bike1 = bike.Bike(200, "20mph")
bike1.displayInfo()
bike2 = bike.Bike(400, "30mph")
bike2.displayInfo()
print bike2

p1 = hospital.patient.Patient("p1", "Dodo", "Milk")
p2 = hospital.patient.Patient("p2", "CoCo", "Coffe")
p3 = hospital.patient.Patient("p3", "Sodo", "Cheese")
p4 = hospital.patient.Patient("p4", "FoFo", "Banana")
p5 = hospital.patient.Patient("p5", "Vodo", "Apple")

h = hospital.Hospital("Ever Green", 3)
h.admit(p1, "bed101")
h.admit(p2, "bed201")
h.admit(p3, "bed1234")
h.admit(p4, "bed1235")
h.admit(p5, "bed1236")

h.discharge("p3")
h.display_info()
print h
print p1

product1 = product.Product(1200, "Surface Pro 1", "0.5lbs", "Microsoft1")
product2 = product.Product(1500, "Surface Pro 2", "0.4lbs", "Microsoft2")
product3 = product.Product(1700, "Surface Pro 3", "0.35lbs", "Microsoft3")
product4 = product.Product(3000, "Surface Pro 4", "0.25lbs", "Microsoft4")
#def __init__(self):

import hospital
#def __init__(self, name, capacity):

import math_dojo
#def __init__(self):

import product
#def __init__(self, price, item_name, weight, brand):

animal = Animal.Animal('zebra', 100)
print animal

bike = Bike.Bike(100, '10mph')
print bike

car = Car.Car(1000, '50mph', 'full', '10mpg')
print car

center = call_center.CallCenter()
print center

hospital1 = hospital.Hospital('RP', 200)
print hospital1

mathdojo = math_dojo.MathDojo()
print mathdojo

product = product.Product(200, 'ipod', '6oz', 'apple')
print product