Question: Problem 1 . Write a class named point in python which has data on cartesian coordinates ( x , y ) and has methods (

Problem 1. Write a class named point in python which has data on cartesian coordinates (x,y) and has methods (1) to convert convert cartesian coordinates to polar coordinates, (2) to print cartesian coordinate (3) to print polar coordinate of the point (4) to compare two points and has a boolean output (5) to find the distance between two points. Instantiate an object of the point class with assigned data.Problem 2. Write a derived class triangle which is made of(bounded by) three lines, and each line is represented by two points (start and end). Write methods in the hierarchy and use code blocks for the tow methods of triangle (1) findAread and (2) findPerimeter. Write the code in python.Problem 3. Write a multithreading code in python which has 15 airlinesAgent as threads each selling 10 tickets of total 150 tickets. The sellTicket function should have prompts as each ticket sold by an agent(use an agent id) and notifying when the quota of selling tickets by each agent is done. Use lock in critical section to output the selling tickets by threads in a sequential manner.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!