Lab 5 - slcc2c/CS5590_Python GitHub Wiki

Lab 5:

  1. Write a python program to create any one of the following management systems. You can also pick one of your own.

a. Library Management System ( should have classes for Person, Student, Librarian, Book etc.)

b. Airline Booking Reservation System ( classes for Flight,Person,Employee,Passenger etc.)

c. Hotel Reservation System (classes for Room,Occupants,Employee etc.)

d. Student Enrollment System ( classes for Student,System,Grades etc.)

e. Expense Tracker System ( classes for Expense, Transaction Category etc.)

Prerequisites:

Your code should have atleast five classes.

Your code should have init constructor in all the classes

Your code should show inheritance atleast once Your code should have one super call

Use of self is required

Use at least one private data member in your code.

Use multiple Inheritance atleast once

Create instances of all classes and show the relationship between them.

Your submission code should point out where all these things are present.

  1. In tutorial 3, we have created tic tac toe. Encapsulate the functions created in tutorial 3 in one class as Game. Also add the following:

I. Add one constructor init in Game class with 3*3 board size

II. Check for winning condition. The player wins the game if any row or any column or any diagonal is filled by a single player. Create member function for the same.

III. Prints the congratulatory message.

IV. Create instance of game and start the game.

V. Remember Player 1 has sign X and player 2 has sign 0

  1. Using Numpy implement game of life for random matrix of size 10*10. Your python source code should show calculations for birth , survive and death as given in rules below.

Hint: refer this link to know rules of game of life

http://jakevdp.github.io/blog/2013/08/07/conways-game-of-life/

Code can be found here Screenshot: