Description
Software Systems Development
Submission Instructions on Moodle:
• Name each submitted file as ‘q<number>.py’. For example, submitted version of script file for question 3 must be named as q3.py .
• A README file for the assignment is mandatory (it will be given some points). The README must include repository link for your code on GitHub and brief explanation for each solution and any exceptions or assumptions you took while solving.
• Put all the files in a folder, name it as your ‘RollNumber’ and compress it as ‘Rollnumber_Assignment3a.zip’.
• Any/all questions/clarifications regarding Assignment 3 must be Via Moodle. Please use the Assignment 3 thread on the News Forum for the same.
Submission Instructions on Github:
• Create a “private” GitHub repository and add user https://github.com/SSDTA” as collaborator.
• Push all three questions to this repository as given in the Moodle submission format and add a readme.md as well.
Question 1.
Write a python program to find common leader of any two employees in an organization.
For example, when inputted the organization chart as in figure below, we can conclude
F is common leader of employee G and employee H
F is common leader for employee G and Employee I
X is common Leader for employee J and employee E
You need to create a JSON file `org.json` in given format (Use Employee number in place of A, B, C……):
The above org chart will be inputted as a JSON like below
{
“L0”: [
{ “name”: “X” }
],
“L1”: [
{ “name”: “A”, “parent”: “X” },
{ “name”: “F”, “parent”: “X” }
],
“L2”: [
{ “name”: “B”, “parent”: “A” },
{ “name”: “G”, “parent”: “F” },
{ “name”: “H”, “parent”: “F” }
],
“L3”: [
{ “name”: “C”, “parent”: “B” },
{ “name”: “D”, “parent”: “B” },
{ “name”: “E”, “parent”: “B” },
{ “name”: “I”, “parent”: “H” },
{ “name”: “J”, “parent”: “H” },
} ]
User can input any two employees’ Emp No. (use input() function) and he should get common leader (Emp ID) as an output.
Also show the level of the leader from employee. For example: leader A is two levels above employee C in the above tree.
#Employee Number format should strictly be of type integer for e.g.: [001-999]
================
Question 2.
Write a python program to find difference between given dates.
For example
Input file date_calculator.txt should be in following format with two rows:
Output file output.txt will have output in number of days as below
Question 3:
You have two text files Employee1.txt and Employee2.txt . Each file contains the busy slots of each employee in a dictionary format.
Key: Employee Name (Assuming the names are all unique)
You need to write a python program that will search for all free slots for the given two employees and reserve the first available common slot. (Slot duration to be inputted by the user). If no common slot available, then just print no slot available.
Workday to be considered from 9AM – 5PM on any given day.
Output file must contain the following, o All Available slots before blocking the slot, o Time of the blocked slot for the both employees.
Example of Input files:
You can create Employee1.txt and Employee2.txt in the given format and ask the user to input meeting slot duration.
Employee1.txt
Employee2.txt
Output file (output.txt)
Available slot
Employee1: [‘9:00AM – 10:00AM’, ’11:00AM – 12:30PM’, ‘1:00PM – 4:00PM’]
Employee2: [‘9:00AM – 10:30AM’, ’11:30AM – 12:00PM’, ‘1:30PM – 3:30PM’, ‘4:30PM – 5:00PM’]
Slot Duration: ½ hour
Note: The timeslots can be different than the ones that are in the example file.




Reviews
There are no reviews yet.