辅导C++程序 辅导C ++String Vector
- 首页 >> C/C++编程#LAB 02- String Vector
**Any program that do not compile will receive a zero**
**Any program that attempts to use std library Vectors will receive a zero**
For this lab you will be creating a auto-expanding dynamic-array. This array will explicitly hold std library strings.
As with all labs you can create any PRIVATE data members/ methods you want, but the Public interface should remain the same.
While tests will be provided, you will need to add your own test cases to ensure all corner cases are accounted for and avoided.
This class will be used for future labs so it is important that it is tested thouroughly.
**The following provides the expected behavior of the private data members and the public interface/API:**
# Lab 3: Last In/First Out, First In/Last Out #
**10 points**
**Due 20 February, 2018**
For this lab, you will be implementing both a *Last In/First Out* and *First In/First Out* data structures. These data structures store data in a way that allows you to only see one value from the structure. You can't see any other value in the structure unless it is the top value.
These structures are important because they allow us to add or remove data members to the structure in an O(1) complexity.
### Lab Instructions
Implement each of the functions to perform the necessary actions outlined in the `.h` files.
As you are writing your functions, read the instructions and think of how you would test that functions while you are writing it. Write your Test first and then implement your functions. Try running your test and then fixing your issues.
`lifo_storage` and `fifo_storage` will both be statically sized, meaning that you don't need to worry about dynamically growing the stringVector. Treat it just like an array.
#### Fifo ####
This lab will take all of the work you have previous done and connect it together to make a calculator. You will be using the expresssionStream from Lab 1 to parse an input expression and calculate that expressoin. You will be implementing the Shunting yard algorithm to perform your calculation. This algorithm uses both Last In/First out (Stack) and First In/First Out (queue) to accomplish the calculation. This means that in order to get your calculator working, you need to have lab 2 and lab 3 working properly.
### Lab Instructions
Implement each of the functions to perform the necessary actions outlined in the `.h` files.
As you are writing your functions, read the instructions and think of how you would test that functions while you are writing it. Write your Test first and then implement your functions. Try running your test and then fixing your issues.
You only need to support integer calculations. If you feel like supporting floating point calculations, you might need to change the way expressionStream works. You will also need to write a new calculate function that returns a float rather than an integer.
You may need to create auxiliary functions to complete tasks, or to avoid copy and pasting repetitive code. Do not make these class functions. These should only appear in the .cpp file