# I need someone to do this assignment for me ASAP.

### Get perfect grades by consistently using www.essayjunction.com. Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20

Order a Similar Paper Order a Different Paper

I need someone to do this assignment for me ASAP.

I need someone to do this assignment for me ASAP.

ITP 165: Intro C++ Pancake game Write a program that let’s the user play a game of Pancake sorting . Here http://datagenetics.com/blog/february42018/index.html is a description of the problem with an online version you can play. Briefly, the game consists of a stack of different sized pancakes in a random stack . The goal is to get them with biggest at the bottom and smallest at the top (and in size order betw een). You have one operation, which is to insert a spatula into the stack and flip over all pancakes above the spatula as a unit. The trick is to insert the spatula at the right point for each turn. Your program should let the user play on a random sta ck, and then let them try again on the same stack, to see if they can do it in fewer flips. See sample output for what this should look like. Requirements The program should work for any number of pancakes from 2 to 20. Ask the user how many to make . Pancakes in the stack should be of sizes 1, 2, 3 … up to the number given. Do not use the vector shuffle function to ran domize the order of pancakes. Cod it yourself. Use a vector to hold size information for pancakes. Show the stack graphically. The sample has ” XX …” 2 letters per size, just for looks (to be wide enough). Ask the use r repeatedly for a flip point. Then flip the stack at that point and show the new state of the stack. Keep asking the user to flip until the stack is sorted , small on top to large on the bottom . Let the user play again on same stack or new stack. Your pancake sNETID .cpp file must begin with comments in the following format (replace the name/email with you actual information): // Name USC -email // ITP 165, 2020 fall // pancakes Write your program with good style and comments. You get graded on program performance and also readability and doing things right. Development suggestions – data To represent the stack itself, you will need a vector of ints for the sizes of the pancakes . That is, the number in each slot will represent the size of the pancake at that slot in the stack. I recommend ignoring the [0] slot and using [1] up to and including the number of cakes . So slot [1] will be the top of the pancake stack, [2] the one under it, etc.. You’ll need a copy of the original stack for when the user wants to play the same stack again. OK, so make one, copy it when you start, copy it back if the user wants to try the same again. Development suggestions – functions Use functions to break the problem down into manageable chunks. If you want to do it differently than the ones I suggest here, ok , but … your code needs to be readable. Most of the following functions ne ed as arguments the stack . I recommend a function to initialize the stack , put pancakes of sizes up to the limit in random order. Do not repeat a size — that’s the hard part. The easiest way might be to put them IN order, then do a bunch of random swaps. You should have a function to print the stack o f pancakes. You should have a function to flip the pancakes, change the order of the size numbers in the stack . A swap function is useful. It might be good to have a function to tell if the problem is solved. This function should return a boolean . As always, I recommend getting the biggest structure working first, the loop that asks if you want to play again. Put on stubs for the details of flipping and all, then fix those later. Sample output Welcome to Pancake Flipping. How many pancakes do you want? (2 -20): 4 1: XX 2: XXXX 3: XXXXXX 4: XXXXXXXX solved in 0 moves. 0=quit, 1=new game, 2=old game: 1 How many pancakes do you want? (2 -20): 4 1: XXXX 2: XX 3: XXXXXX 4: XXXXXXXX flip point (1)? 2 1: XX 2: XXXX 3: XXXXXX 4: XXXXXXXX solved in 1 moves. 0=quit, 1=new game, 2=old game: 2 1: XXXX 2: XX 3: XXXXXX 4: XXXXXXXX flip point (1)? 3 1: XXXXXX 2: XX 3: XXXX 4: XXXXXXXX flip point (2)? 2 1: XX 2: XXXXXX 3: XXXX 4: XXXXXXXX flip point (3)? 3 1: XXXX 2: XXXXXX 3: XX 4: XXXXXXXX flip point (4)? 2 1: XXXXXX 2: XXXX 3: XX 4: XXXXXXXX flip point (5)? 3 1: XX 2: XXXX 3: XXXXXX 4: XXXXXXXX solved in 5 moves. 0=quit, 1=new game, 2=old game: 1 How many pancakes do you want? (2 -20): 5 1: XXXXXXXX 2: XXXXXXXXXX 3: XXXX 4: XXXXXX 5: XX flip point (1)? 2 1: XXXXXXXXXX 2: XXXXXXXX 3: XXXX 4: XXXXXX 5: XX flip point (2)? 5 1: XX 2: XXXXXX 3: XXXX 4: XXXXXXXX 5: XXXXXXXXXX flip point (3)? 2 1: XXXXXX 2: XX 3: XXXX 4: XXXXXXXX 5: XXXXXXXXXX flip point (4)? 3 1: XXXX 2: XX 3: XXXXXX 4: XXXXXXXX 5: XXXXXXXXXX flip point (5)? 2 1: XX 2: XXXX 3: XXXXXX 4: XXXXXXXX 5: XXXXXXXXXX solved in 5 moves. 0=quit, 1=new game, 2=old game: 0 Deliverables Submit your pancakesNETID.cpp to Blackboard. rubric for Pancakes points initial size setup, variables to represent the pancakes 5 main loop, sequence of parts, function calls 5 display of pancake stack 5 flipping operation 5 solution detector 5 restore old game 5 comments, formatting, submission 5 total 35 Remember that looking at, sharing, or copying anyone else’s code , is considered cheating . If you need help with something, ask in class, ask one of the instructors during office hours, ask a TA in office hours, ask on Piazza , or ask a peer to verbally explain a concept to you or pract ice programming with them on something ELSE .

### We offer the best essay writing services to students who value great quality at a fair price. Let us exceed your expectations if you need help with this or a different assignment. Get your paper completed by a writing expert today. Nice to meet you! Want 15% OFF your first order? Use Promo Code: FIRST15. Place your order in a few easy steps. It will take you less than 5 minutes. Click one of the buttons below.

### Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper NowOrder a Similar Paper Order a Different Paper