/chocolate-chocolate-separation-queue-structure

Implement the given methods of queue structure using node structure and pointers a) Create node structure that can store integers b) Create queue class, declare data members as discussed and write constructor • Write main method and create a queue object c) Write display method that display the queue each element on new line. Take care of head & tail(it should not move or any other thing should not change) • Call this method in main to test d) Write add method that accept an integer and place it at the end of queue. Properly adjust the pointers. • Call this method in main to add 21, 54, 67, 88, 44, 33, 48, 44, 109, 133 in the queue, and display to confirm e) Write add method that accepts a Node and place it at end of queue • Call this method to add 150 in existing queue f) Write remove method that remove first element from the queue and return removed if element is removed. Implement the cases as discussed in theory. Properly take care of pointers (both head & tail). • Call this method in main to remove and element and display to confirm g) Write search method that accepts a number and return its position in the queue • Call this method to find 67 h) Write get method that accepts position, and return element found at that position. Properly look for index bounds • Call this method to replace find 133 i) Write size method that return number of elements in the queue • Call this method to determine queue size In chocolate production company there are different kind of chocolates. Some people like wafers with chocolate coating. Company weigh each wafer stick and dip in chocolate container to coat it. At the end it is weighted again to meet quality. If any piece is found below form expected weight it has to be re-dipped (and placed on main conveyer again) and overweighed pieces are packed in different weight category. The process is automatic and hundreds of items are processed in a second. The conveyor belt moves the wafers and each of them weighted. The machine arm segregate them based on the weight and move into different conveyer belt. Take wafers form main entry point (consider it as queue) and based on below threshold move them to different conveyer belt (consider them as queues).  Packing conveyer (wafers weigh from 48g – 52g)  Re-dip Conveyer (wafers weigh below 47g)  Over weigh Conveyer (wafers weigh above 52g) You have to count that how many are packed in (48-52) category, how many are re-dipped and how many are move to different weight category. If wafer stick weigh is 15g the find how much chocolate solution is consumed? Implement the simulation by taking weight randomly

Primary LanguageC++MIT LicenseMIT

chocolate-chocolate-separation-queue-structure

Implement the given methods of queue structure using node structure and pointers a) Create node structure that can store integers b) Create queue class, declare data members as discussed and write constructor • Write main method and create a queue object c) Write display method that display the queue each element on new line. Take care of head & tail(it should not move or any other thing should not change) • Call this method in main to test d) Write add method that accept an integer and place it at the end of queue. Properly adjust the pointers. • Call this method in main to add 21, 54, 67, 88, 44, 33, 48, 44, 109, 133 in the queue, and display to confirm e) Write add method that accepts a Node and place it at end of queue • Call this method to add 150 in existing queue f) Write remove method that remove first element from the queue and return removed if element is removed. Implement the cases as discussed in theory. Properly take care of pointers (both head & tail). • Call this method in main to remove and element and display to confirm g) Write search method that accepts a number and return its position in the queue • Call this method to find 67 h) Write get method that accepts position, and return element found at that position. Properly look for index bounds • Call this method to replace find 133 i) Write size method that return number of elements in the queue • Call this method to determine queue size In chocolate production company there are different kind of chocolates. Some people like wafers with chocolate coating. Company weigh each wafer stick and dip in chocolate container to coat it. At the end it is weighted again to meet quality. If any piece is found below form expected weight it has to be re-dipped (and placed on main conveyer again) and overweighed pieces are packed in different weight category. The process is automatic and hundreds of items are processed in a second. The conveyor belt moves the wafers and each of them weighted. The machine arm segregate them based on the weight and move into different conveyer belt. Take wafers form main entry point (consider it as queue) and based on below threshold move them to different conveyer belt (consider them as queues).  Packing conveyer (wafers weigh from 48g – 52g)  Re-dip Conveyer (wafers weigh below 47g)  Over weigh Conveyer (wafers weigh above 52g) You have to count that how many are packed in (48-52) category, how many are re-dipped and how many are move to different weight category. If wafer stick weigh is 15g the find how much chocolate solution is consumed? Implement the simulation by taking weight randomly