Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • ng-renney/cpp-resources
  • mj2-opena/cpp-resources
  • k2-alenezi/cpp-resources
  • m4-albalushi/cpp-resources
  • pm2-dixon/cpp-resources
  • m3-howladar/cpp-resources
  • laa2-alkaabi/cpp-resources
  • n2-fonsecamanc/cpp-resources
  • amn2-aldossary/cpp-resources
  • i23-davies/cpp-resources
  • ub2-ibeh/cpp-resources
  • w3-alshammari/cpp-resources
  • m2-aldhfeeri/cpp-resources
  • h3-alsaloumi/cpp-resources
  • h2-alfaresi/cpp-resources
  • r22-islam/cpp-resources
  • w2-alrashidi/cpp-resources
17 results
Select Git revision
Show changes
Commits on Source (8)
# Week 10
# IMPORTANT:
This week there is a new seminar format - we now move to just two sessions which will mean larger groups, however these will be held in lecture halls with an appropriate capacity! It's important however that you check which room this session is **EVERY WEEK**. ***These sessions are currently scheduled for a few different rooms***
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=9bd6a8e9-8470-464d-9abc-add000bbe3ae&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/bbcswebdav/pid-10055043-dt-content-rid-41743738_2/xid-41743738_2)>
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on
### 👉 [WORKSHEET 3](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet3/worksheet3.md?ref_type=heads) 👈
- Writing simple programs that use print statements (either
```std::cout``` or `printf()` is acceptable)
- Using for loops to control the flow of programs
- Continuing to write simple expressions and statements to solve problems
- Making use of variables, literals and common types
## Have already completed ...
- Setup up your own machine for development
- Understand the basics of git for forking, cloning and pushing code.
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
* Completed [WORKSHEET 3](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet3/worksheet3.md?ref_type=heads)
- Watching [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=9bd6a8e9-8470-464d-9abc-add000bbe3ae&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/bbcswebdav/pid-10055043-dt-content-rid-41743738_2/xid-41743738_2)
* Submitted Worksheet 2
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 3
...you should be able to:
- Print to the console in c++
- Write at least one type of loop in c++
## Resources
- [WORKSHEET 3](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet3/worksheet3.md?ref_type=heads)
- [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=9bd6a8e9-8470-464d-9abc-add000bbe3ae&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/bbcswebdav/pid-10055043-dt-content-rid-41743738_2/xid-41743738_2)
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
### External
> Note the following resources are from alternative sources and so not everything shown will align with how we are working (things like using different IDEs and compilers.) They are provided as extra resources for further and more varied explantations on related topics.
- [w3 schools](https://www.w3schools.com/cpp/cpp_output.asp)
- [Derek Banas C++ ](https://www.youtube.com/watch?v=Rub-JsjMhWY&t=2487s)
- [using cout](https://www.youtube.com/watch?v=jVC5r0Fpibc)
- [VERY fast overview of printing](https://youtu.be/MNeX4EGtR5Y?si=1uU6QqdFAFUIaH3x&t=70)
# Week 11
### IMPORTANT:
Don't forget to check your seminar room!
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=22eaa667-dd83-402e-a703-add900f21b1a&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/webapps/blackboard/execute/content/file?cmd=view&content_id=_10055046_1&course_id=_358428_1&launch_in_new=true)
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on
### 👉 [WORKSHEET 4](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet4/worksheet4.md?ref_type=heads) 👈
- Writing simple programs that use print statements (either
```std::cout``` or `printf()` is acceptable)
- Using for loops to control the flow of programs
- Continuing to write simple expressions and statements to solve problems
- Making use of variables, literals and common types
## Have already completed ...
- Setup up your own machine for development
- Understand the basics of git for forking, cloning and pushing code.
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
- Watching [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=22eaa667-dd83-402e-a703-add900f21b1a&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/webapps/blackboard/execute/content/file?cmd=view&content_id=_10055046_1&course_id=_358428_1&launch_in_new=true)
* Submitted Worksheet 3
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 4
...you should be able to:
- Write functions including selecting appropriate return types and arguments
- Make function calls and pass arguments to functions when calling them
- Use existing functions from a library to program more complex tasks
- Use nested loops and conditional statements
- Understand the rules to Conway's Game of Life and observe how it creates complex results
## Resources
- Wikipedia Article on Conways Game of Life [here](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
- The Game of Life Wiki [here](https://www.conwaylife.com/wiki/Main_Page) is great for finding more advanced patterns etc.
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
### External
> Note the following resources are from alternative sources and so not everything shown will align with how we are working (things like using different IDEs and compilers.) They are provided as extra resources for further and more varied explantations on related topics.
- [w3 schools](https://www.w3schools.com/cpp/cpp_output.asp)
- [Derek Banas C++ ](https://www.youtube.com/watch?v=Rub-JsjMhWY&t=2487s)
- [using cout](https://www.youtube.com/watch?v=jVC5r0Fpibc)
- [VERY fast overview of printing](https://youtu.be/MNeX4EGtR5Y?si=1uU6QqdFAFUIaH3x&t=70)
# Week 12
### IMPORTANT:
Don't forget to check your seminar room!
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=fe1c9ffb-cf06-4c1e-a946-ade000d07d12&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on
### 👉 [WORKSHEET 4](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet4/worksheet4.md?ref_type=heads) 👈
Optionally moving on to 👉 [WORKSHEET 5](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet5/worksheet5.md?ref_type=heads) 👈
- Writing code that uses functions
- Converting pseudocode into c++
- Exploring more substantial code projects
## Have already completed ...
- Submitting worksheets 2 and 3, ensuring you have also uploaded you git repo link to blackboard
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
- Watching [This weeks lecture](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=fe1c9ffb-cf06-4c1e-a946-ade000d07d12&instance=Blackboard) and [slides](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
* Submitted Worksheet 3
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 4
...you should be able to:
- Write functions including selecting appropriate return types and arguments
- Make function calls and pass arguments to functions when calling them
- Use existing functions from a library to program more complex tasks
- Use nested loops and conditional statements
- Understand the rules to Conway's Game of Life and observe how it creates complex results
## Resources
- Wikipedia Article on Conways Game of Life [here](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
- The Game of Life Wiki [here](https://www.conwaylife.com/wiki/Main_Page) is great for finding more advanced patterns etc.
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
# Week 13
### IMPORTANT:
Don't forget to check your seminar room!
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lectures are 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on
### 👉 [WORKSHEET 5](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet5/worksheet5.md?ref_type=heads) 👈
- Writing code that uses classes
- Applying problem solving to create solutions to new concepts
- Exploring even more substantial code projects
## Have already completed ...
- Submitting worksheets 2 and 3, ensuring you have also uploaded you git repo link to blackboard
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
- Watching [Lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
* Submitted Worksheet 4
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 5
...you should be able to:
- Write and/or understand C++ Classes
- Make instances of classes and use existing classes
- Split your code between implmentation (.cpp) and declaration/header (.hpp) files
## Resources
- [This weeks lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
- [w3 schools covering classes](https://www.w3schools.com/cpp/cpp_classes.asp)
- [video on classes](https://www.youtube.com/watch?v=3dHBFBw13E0)
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
# Week 14
### IMPORTANT:
Don't forget to check your seminar room!
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lectures are 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on
### 👉 [WORKSHEET 5](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet5/worksheet5.md?ref_type=heads) 👈
- Continuing worksheet 5 and catching up on any outstanding work
- Preparing for the assignment
## Have already completed ...
- Submitting worksheets 2 ,3 and 4, ensuring you have also uploaded you git repo link to blackboard
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
- Watching [Lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
* Submitted Worksheet 5
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 5
...you should be able to:
- Write and/or understand C++ Classes
- Make instances of classes and use existing classes
- Split your code between implementation (.cpp) and declaration/header (.hpp) files
## Resources
- [This weeks lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
- [w3 schools covering classes](https://www.w3schools.com/cpp/cpp_classes.asp)
- [video on classes](https://www.youtube.com/watch?v=3dHBFBw13E0)
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
# Week 15
### IMPORTANT:
Don't forget to check your seminar room!
> **This week's quiz can be found here:** https://go.uwe.ac.uk/cppQuiz
>
> [This weeks lectures are 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
💬 There is now a discord. Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK") 💬
## Working on and submitting
### 👉 [WORKSHEET 5](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/worksheets/worksheet5/worksheet5.md?ref_type=heads) 👈
- Continuing worksheet 5 and catching up on any outstanding work
- Exploring any concepts that you were less confident on in the last few weeks!
- You can start thinking about and working on the assigment
## Have already completed ...
- Submitting worksheets 2 ,3 and 4, ensuring you have also uploaded you git repo link to blackboard
If you have not already completed this please do so ASAP.
## By the end of the week...
... you should have completed:
- Watching [Lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
* Submitted Worksheet 5
- Attend the new format seminar session **(Please check your timetable as the location changes weekly!)**
- Join the discord if you want to : [https://discord.gg/V559GVJQnK](https://discord.gg/V559GVJQnK "https://discord.gg/V559GVJQnK")
- Attend 2 practicals to work on worksheet 5
...you should be able to:
- Write and/or understand C++ Classes
- Make instances of classes and use existing classes
- Split your code between implementation (.cpp) and declaration/header (.hpp) files
## Resources
- [This weeks lectures 6 and 7, found here](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_10054823_1&course_id=_358428_1#contextMenu)
- [w3 schools covering classes](https://www.w3schools.com/cpp/cpp_classes.asp)
- [video on classes](https://www.youtube.com/watch?v=3dHBFBw13E0)
- Guide on using [Command Line Interfaces ](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/cli.md?ref_type=heads)
- [Git submissions](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-submissions.md?ref_type=heads)
- [Git Reference](https://gitlab.uwe.ac.uk/ng-renney/cpp-resources/-/blob/main/guides/git/git-reference.md?ref_type=heads)
......@@ -34,8 +34,8 @@ In this session, we will need to create a project from scratch.
cd Documents/programming-in-cpp/
#create a new directory
mkdir session2
cd seminar2
mkdir worksheet3
cd worksheet3
```
In this directory we should create a ```.cpp``` file for each task. Each will contain a main function and can be compiled by selecting it and building (```ctrl + shift + b```).
......@@ -84,16 +84,9 @@ Try adding the print statement above to the body of the main function and compil
To run the program, use ```./``` followed by the name of the newly created executable (which will take the name of the file it is created from)
> Shortcut: use ```ctrl``` + ``` ` ``` to open a terminal in VS Code
```bash
# On windows probably:
.\tasks.exe
# or
.\main.exe
# On linux/osx probably:
#probably somthing like (depending what you named it):
./tasks
# or
./a.out
......@@ -262,7 +255,6 @@ int main(){
```
# Tasks
For this worksheet, a single file for each program will be created, meaning you will create the following files yourself:
......
......@@ -23,18 +23,17 @@ int main(){
}
```
The marking scheme for this session is as follows:
- Task 1 : 40 marks
- Task 2 : 60 marks
- Task 3 : 0 marks
A project is provided for you at the following link:
https://gitlab.uwe.ac.uk/br-gaster/worksheet5_tasks
# Stacks
......@@ -45,18 +44,11 @@ When creating a stack of plates, you can only access the last plate that was pla
Given a stack of plates we can do the following:
- Add a plate to the top (push)
- Take a plate from the top (pop)
- Count the number of stacked plates (size)
- Check if there are any plates at all (empty)
- Check if the stack is as high as is possible (full)
These analogous operations represent the functions we require to implement a stack.
......@@ -65,19 +57,12 @@ By then researching reverse Polish notation we can use the stack data structure
# Notes on Classes
For an introduction to Classes you should watch the lecture [here](https://uwe.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=90cfe1db-c303-4dac-8250-ade700f7c3a5).
### Using a class
Remember, as discussed in a lecture. Writing a class is like a blueprint. To use you class you need to create an instance of a class (in a similar way to how you declare a variable). You do this by providing the name of the class and then a name for you instance:
```c++
ClassName instance_name;
......@@ -85,13 +70,9 @@ ClassName instance_name;
```
To call member functions, you will need to use the scope operator:
```c++
instance_name.function_call();
......@@ -172,7 +153,6 @@ Please also refer to the Readme.md that you can view on the gitlab page for your
**Task 2 -** Using your stack class, implement the reverse polish notation calculator.
- You can find a good explanation of RPN in the related [wikipedia article (here)](https://en.wikipedia.org/wiki/Reverse_Polish_notation) and the popular computer science Youtube channel Computerphile also has an excellent video on how RPN is related to stacks [here](https://www.youtube.com/watch?v=7ha78yWRDlE).
- You need to implement the ```rpn_eval(std::string expr)``` function, found in ```rpn.cpp```. This function receives the expression that is input in the web client and you should return the answer as a string.
......