Implement a watch using static and dynamic queues-Define a Watch class-constructor and destructor-The watch class consists of 6 queues:hoursSQ, minutesSQ, secondsSQ (static queues), hoursDQ, minutesDQ, secondsDQ, (dynamic queues).-An object of Watch class will stimulate a real watch, add seconds in the secondsSQ and secondsDQ. when the numbers of seconds reachs 60 a new minute is added to the minutesSQ and minutesDQ, and secondsSQ and secondsDQ shall be freed. When the number of minutes reaches 60, a new hour is added to the hoursSQ and hoursDQ, and minutesSQ and minutesDQ shall be freed.-Your Watch class shall have the necessary methods to fill and empty the 6 queues when needed.-Your code shall perform the same watch tasks using both the static and dynamic queues.-The Watch class shall have two methods getSTime() and getQTime and both shall print it out the current time at any time they get called.-Whenever the hoursSQ and hoursDQ queues finish counting 24 hours you can free them.
Problem2.Implement robotTracker using stacks and queuesThe robot can move one step every time it moves, the step could be up, down, left, and right. Ask the robot to move randomly n step, then ask the robot to move randomly m steps. calculate which position is closer to the start point, the position after the n steps or the position after the m steps (start point is at (0,0) with respect to the Cartesian plane. (The distance between two points P and Q is the square root of the horizontal distance between the points squared plus the vertical distance between the points squared =
)-Define a robotTracker class.-constructor and destructor-Move method (to randomly change x and y).-A stack to save the robot movements as (x,y) points.-x and y coordinates of the robot-getDistance() to calculate the distance between two points-A print method to print the last coordinates of the robot.-Methods to push values to the stack, and to pop values out of the stack when needed.-Test your code in a driver program.