From caffb3521ea9a4bb158227b0db13a450b601f921 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Thu, 14 Jan 2021 11:04:10 +0000 Subject: [PATCH 01/42] Unreal Engine Projects --- subjects/armyofone/README.md | 2 + subjects/firingrange/README.md | 2 + subjects/jumpo/README.md | 83 +++++++++++++++++++++++++++ subjects/jumpo/audit/README.md | 77 +++++++++++++++++++++++++ subjects/mousevr/README.md | 2 + subjects/stealth-boom/README.md | 81 ++++++++++++++++++++++++++ subjects/stealth-boom/audit/README.md | 67 +++++++++++++++++++++ subjects/the-pages/README.md | 44 ++++++++++++++ subjects/the-pages/audit/README.md | 55 ++++++++++++++++++ subjects/vehiclephysics/README.md | 2 + subjects/widgetfactory/README.md | 5 ++ subjects/zombieai/README.md | 2 + 12 files changed, 422 insertions(+) create mode 100644 subjects/jumpo/README.md create mode 100644 subjects/jumpo/audit/README.md create mode 100644 subjects/stealth-boom/README.md create mode 100644 subjects/stealth-boom/audit/README.md create mode 100644 subjects/the-pages/README.md create mode 100644 subjects/the-pages/audit/README.md diff --git a/subjects/armyofone/README.md b/subjects/armyofone/README.md index 4e91e5d88..4429556c8 100644 --- a/subjects/armyofone/README.md +++ b/subjects/armyofone/README.md @@ -36,3 +36,5 @@ After downloading and unzipping this [file](https://assets.01-edu.org/Unreal-Eng When finished, your project should look like the [“Expected Result” video](https://youtu.be/sebi5icA1MM). > Do not forget to zip up the project compile and save everything for peer correction. + +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. diff --git a/subjects/firingrange/README.md b/subjects/firingrange/README.md index 85258164e..3c652b9e6 100644 --- a/subjects/firingrange/README.md +++ b/subjects/firingrange/README.md @@ -34,3 +34,5 @@ Here are some ideas for improving the game: - Targets with different speeds. - Textures on the walls and ground. - Adding obstacles in front of the targets. + +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. diff --git a/subjects/jumpo/README.md b/subjects/jumpo/README.md new file mode 100644 index 000000000..c6d01a455 --- /dev/null +++ b/subjects/jumpo/README.md @@ -0,0 +1,83 @@ +## jumpo + +In this project, you will have to create a 2D sidescroller game. You will be using for the first time an external SDK to compile your game: the Android SDK Tool for Unreal Engine, that allows you to create a [.apk file](https://fileinfo.com/extension/apk) that can be installed and played on any Android devices. + +### Objectives + +In this game for Android the player will control a character in a similar game to Google Chrome Running Dinosaur but with coins or gems. So the game will have buttons on screen and that will be bound to character actions like jumping, ducking, etc... Another goal of this project is the sprite and [flipbook](https://docs.unrealengine.com/en-US/AnimatingObjects/Paper2D/Flipbooks/index.html) creation that is used to animate 2D art. + +The basic assets you will need for this project can be found in the ["Jumpo.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/Jumpo/Jumpo.zip) file. + +### Instructions + +The following are the requirements for this project: + +- This game should have a main menu that must have a: + + - Start button, that loads the game. + - Stats button, that shows you how many coins you’ve collected overall, how many times you died, number of games and highest score. You can add more information if you want to. + - Leaderboard button, that shows the 5 highest scores ever made. + - Credits button, that shows the names of the developers that worked on the project. + - Character button, that shows the locked and unlocked characters. + - Quit button, that closes the app. + +#### Map + +These are the requirements regarding the game map: + +- Create a 2D map with obstacles that the player has to dodge by jumping or ducking. +- No 3D objects are allowed in any scene of the game. +- The game is meant to be played in landscape mode. + +#### Character and Gameplay + +For the character these are the requisites: + +- You are free to choose what character you want to use in your game. You can use the resource ones or you can check [this website](https://www.spriters-resource.com/) for more characters and sprites. +- The character should be "running" from left to right, so the character must be headed right. + - The character should actually be static in relation to the background and only the background is moving from right to left, giving the illusion that the character is the one moving. + - Once a part of the background is out of sight it gets destroyed or moved to the right. +- If the character does not die, the map should be infinite. +- Each action (running, jumping, ducking and dying) should play a different animation (a different flipbook). + - Use the .png or .tga files to extract and create a flipbook. +- While running, obstacles should appear on the character path. + - The character can either jump or roll under obstacles to survive. +- When the character hits an obstacle, it dies and the die flipbook animation gets played. + - When the character dies, a score screen is displayed and the player needs to enter 3 characters to save his score in the Leaderboard (a sort of nickname). +- The more time the character survives, the more points he earns. +- The character can collect coins/gems to load an invincibility bar. + - The number of coins collected during that run should appear on the screen as well as the progress of the invincibility bar. + - Once the invincibility bar is loaded up, the player can press it and the character becomes invincible for a short period of time. + - When the invincibility bar gets emptied, the character comes back to normal. +- The jump and roll button should be accessible using thumbs when holding the phone (in the lower corners). +- During the game, the highest ever score should appear on the top middle of the screen and the current score right below it. +- A pause button should appear somewhere on the screen but should not disturb the player experience. Top right is a good place for it. +- When the player presses the pause button or when the character dies, three buttons should appear: + - Retry -> Restarts the game and all progress is lost if the game is in pause. + - Menu -> Goes back to the main menu and all progress is lost if the game is in pause. + - Quit -> Quits the entire app. + +#### Other Game Features + +In addition to the requirements of the map and the character, these are other aspects that need to be taken into account: + +- When closing the app and launching it again, all the player data should remain as he leaved before. + +On the main menu: + +- On the "Character" tab, the player sees grayed-out characters. These are the locked characters. + - This characters can be unlocked by spending coins/gems collected. + - When first opening the game, there should be only one character unlocked. +- When a player dies, the Leaderboard should be updated accordingly to the score the player just made if it is on the 5 best score ever. + - Also the Stats should be updated after every game, whether it is or it is not one of the best 5 scores ever. +- On the Leaderbord and on the Stats tabs, a button to reset all the stats should be available. + +#### Android + +In order to complete this project you are going to need to run your game in Android devices. For that you will need to install an Android SDK. Here is the Unreal Engine [documentation](https://docs.unrealengine.com/en-US/SharingAndReleasing/Mobile/Android/Setup/AndroidStudio/index.html) for that and a [video](https://www.youtube.com/watch?v=q-mAEnqZb0M) that could also help you. + +- You could use your own android device or you could use an emulator to install the app on it and run the app to confirm that everything is working properly on Android devices. + +### Hints + +If you want a good example of how a 2D game is created you can try the [Tappy Chicken](https://assets.01-edu.org/Unreal-Engine-Projects/Jumpo/TappyChicken.zip) game provided. Or you can create an empty project and choose "2D Sidescroller Game" template which contains a lot of info that will be helpful for this project. diff --git a/subjects/jumpo/audit/README.md b/subjects/jumpo/audit/README.md new file mode 100644 index 000000000..c722a1c03 --- /dev/null +++ b/subjects/jumpo/audit/README.md @@ -0,0 +1,77 @@ +#### Functional + +###### A main menu is displayed at the game startup, displaying 5 options? + +###### Does the Credits button shows you the names of the developers that worked on the project? + +###### Does the Quit button makes the player quit the game? + +###### Does the Start button on the main menu starts a new game? + +###### Does the Character button shows you the unlockable characters and the price to unlock them? + +###### Does the Leaderboard button shows the 5 best scores? + +###### Does the Stats button shows the games stats (amount of coins you’ve collected overall, how many times you died, number of games and highest score)? + +###### Does the maps contain obstacles that the player has to dodge? + +###### Can you confirm that there is no 3D objects in the game? + +###### Is the game meant to be played in landscape mode? + +###### Is the player heading right? + +###### Is actually the background moving from right to left, giving the illusion that the player is the one moving? + +###### Is the map infinite if the character does not hit anything? + +###### Does each action (running, jumping, ducking and dying) play a different flipbook? + +###### When the character hits an obstacle does he dies? + +###### When the character dies does a score screen gets displayed and the player needs to enter 3 characters to save his score in the Leaderboard? + +###### If the score of the player is one of the best 5 scores ever, does the Leaderboard gets updated? + +###### Can the character collect coins/gems? + +###### Does the invincibility bar fills up when collecting coins/gems? + +###### Does the character becomes invincible for a little while once the player touches the invincibility bar? + +###### When the invincibility bar gets emptied does the character comes back to normal? + +###### Are the jump and duck/roll button accessible using thumbs when holding the phone? + +###### Can the character jump and duck/roll when touching the buttons? + +###### Are the highest score and current score displayed on the top middle of the screen while playing? + +###### Is the current score being updated as you play? + +###### Is a pause button available to the player? + +###### Does the Retry button on the pause menu starts a new game, losing the previous progress made? + +###### Does the Menu button on the pause menu takes the player to the main menu, losing the previous progress made? + +###### When pressing the pause button, the game stop on the background and the retry, menu and quit button appear on screen? + +###### Does the Quit button on the pause menu, quits the entire app? + +###### When quitting the app and turning back, does the Stats and Leaderboard menu still contains data? + +###### If in the Leaderboard or Stats menu you press the reset button, is all data reset to 0? + +###### Is the apk is built using the latest Android SDK version? + +#### Bonus + +###### Can the player buy an extra life before the start of the game using coins/gems? + +###### Are different sprites being used from the ones provided? + +###### Are there different map backgrounds? + +###### Can the coins/gems be used in an in-game store to buy skins/perks other than invincibility? diff --git a/subjects/mousevr/README.md b/subjects/mousevr/README.md index b94d786ed..940259540 100644 --- a/subjects/mousevr/README.md +++ b/subjects/mousevr/README.md @@ -50,4 +50,6 @@ The following are the bonuses for this project: - Animate the interaction points. - Add looping background music during the experience. +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. + Ah! I made you look. diff --git a/subjects/stealth-boom/README.md b/subjects/stealth-boom/README.md new file mode 100644 index 000000000..f625ee6e9 --- /dev/null +++ b/subjects/stealth-boom/README.md @@ -0,0 +1,81 @@ +## stealth-boom + +In this project, you will have to create an entire stealth game using Unreal Engine. + +### Objectives + +The idea of this project is to create a little 10 minutes gameplay game with missions, stealth based gameplay and AI patrolling NPC. + +The basics assets you will need for this project can be found in the [Stealth-Boom.zip](https://assets.01-edu.org/Unreal-Engine-Projects/StealthBoom.zip) file. It contains the basic animations, character, enemies and props you will need for this project. + +### Instructions + +The following aspects should be fulfilled: + +- Create a map where the player can walk around. + + - This map should contain places for the player to hide from enemies by crouching, hide behind walls, and all other props you may use to help to make a stealth game. + - Buildings with at least 2 floors. + - Pickable ammunition and weapons around the map. + +- For the player you should add: + + - Walk and run animations + - Reload animation + - Aim animation + - Shoot animation + - Crouch animation + - the player should be able to do the above six actions while crouching + - Melee attack animation + - Gun sound when firing + - Bullets visual impact on walls (see decals documentation) + - Blood particles when hit + +- The game should contain a main menu where the player can: + + - Start the game + - Adjust the general sound of the game + - Change the graphics settings + - When changing the resolution, a pop-up should appear in the middle of the screen asking if the player wants to keep the graphics setting he/she just applied. If `Yes` is clicked within 10 seconds, the settings are set, otherwise, if the 10 seconds delay is over or if the player click `No`, the settings go back to the old ones. + - Change the mouse sensitivity + - Invert mouse vertical axis + +- You should have at least 3 types of enemies: `Guards` (patrol around and are look for intruders), `Drones` (same as Guards but can fly), and `Cameras` (stationary and look for intruders). More enemies can be added if you want to. + + - Guards AI: + - Guards should be able to patrol around the map; + - A Guard is able to see the player, if the player crosses his field of view; + - When the player enters the field of view of a Guard, the Guard enters into chase mode and must start running after the player, take cover and shooting at the player. + - If the player leaves the field of view for a certain time, the Guard goes back to patrol mode. + - Drones AI: + - Drones should be able to patrol around the map; + - A light color should determine the state of the drone (Blue for patrolling, Red for chasing the player); + - Once the player crosses the drone camera, the drone light turns red and the drone enters chase mode; + - When a drone is in chase mode, all the guards on the area are alerted, and should enter chase mode as well; + - When the player is out of the drone sight, the drone turns back to patrol mode; + - The sight radius should be inferior on the drones that on the guards. + - Camera AI: + - Cameras should be placed on walls; + - Cameras should have the same light sign as the drone, so when the player is in the camera sight, the camera light turns red and all Guards enter in chase mode; + - As the Drones, Cameras warn guards, whenever the player passes through the camera field of view; + - Some Cameras should lock access of certain areas of the map (for example, close doors) when the player is detected by that camera. + +- Drones, Guards and Cameras should have sounds effect whenever they change from chase to patrol mode, as wel as the other way around. + +- All AI should be implemented using Behavior Trees except for the Camera. + +- The player mission is up to you, either it can be some task to fix, kill all guards without getting caught or collect documents... Whatever you choose, the player should have enemies on his way to diver him away from his objective. + + - When the player successfully completes his mission, a pop up should appear saying that the mission is completed. + +- The player has a health bar that should go down whenever the player gets shot. When the player dies, he has the choice to either quit the game, go back to the main menu or start over. + + - If the player starts over, the level should not be reloaded. The player should spawn back to the starting point. + +- When pressing `Esc` the game is set on paused and the main menu widget pops up. + + - The player should be able to change the game graphics setting exactly like in the main menu. + +- A game should not last longer than 6 minutes. After that the same choices should appear as when the player dies. + +> Do not forget to zip up the project compile and save everything for peer correction. diff --git a/subjects/stealth-boom/audit/README.md b/subjects/stealth-boom/audit/README.md new file mode 100644 index 000000000..7e27c5a95 --- /dev/null +++ b/subjects/stealth-boom/audit/README.md @@ -0,0 +1,67 @@ +#### Functional + +###### Does the map contain places for the player to hide from enemies? + +###### Does the map contain buildings, pickable ammunition and weapons placed around the map? + +###### Does the player has all the minimal animation required (walking, running, melee attacking, aiming, reloading, shooting, crouching, crouch walking, crouch aiming, crouch reloading, crouch shooting)? + +###### Is there a sound for the player shooting? + +###### Are there bullets impact when shooting at a wall? + +###### When the player is hit are there any blood particles? + +###### A main menu with the five options is displaying on the screen? + +###### Can the general sound of the game be managed directly on the settings menu? + +###### When changing the resolution, does a pop-up get displayed on the screen to confirm the changes we just set? + +###### Does pressing “No” on the graphics confirmation pop-up, resets the settings to the old ones? + +###### Are the mouse settings (mouse sensitivity, invert mouse vertical axis) functioning according to their descriptions? + +###### Does the guards and drones wander around the map? + +###### When a player enters the field of view of a guard does he switches to chase mode, running and shooting towards the player while also taking cover? + +###### Does the drone light switches between each state? Blue for patrolling and red for chase mode (when a player crosses his sight)? + +###### Whenever a drone turns to chase mode, do all the guards on the area get alerted and switch to chase mode as well? + +###### Does the drone comes back to patrol mode when the player is out of the drone sight? + +###### Is the sight radius of the drones smaller than the guards? + +###### Are cameras attached to walls? + +###### Do cameras have similar light sign as the drones (red for alert mode and blue for patrol)? + +###### As the drones, do the cameras alert guards on the area, switching them to chase mode? + +###### Do some cameras lock access to certain areas of the map, when they detect a player? + +###### Do Guards, Drones and Cameras play an alert sound when a player gets detected? + +###### Does the camera can close some part of the map (Doors, open traps and kill the player etc…) to the player when the player is being detected? + +###### Are Behavior Trees used to implement the AI of the Guards and Drones? + +###### Does the player have a goal? + +###### When the goal of the player is successfully completed, does a pop up appear saying that the mission is completed? + +###### Does the player have a health bar? + +###### Does the player health decreases when he gets shot by the guards? + +###### When the player loses all his health (dies), does he get to choose either to quit the game, go back to the main menu or to start over? + +###### If the player starts over does he spawn back at the starting point? + +###### The lifespan of the game is at least 6 minutes long from launch to mission complete? + +#### Bonus + +###### Are there headshots implemented? diff --git a/subjects/the-pages/README.md b/subjects/the-pages/README.md new file mode 100644 index 000000000..f27f88461 --- /dev/null +++ b/subjects/the-pages/README.md @@ -0,0 +1,44 @@ +## the-pages + +In this exercise, create a mini-horror game inspired on ["Slender: The Eight Pages"](https://en.wikipedia.org/wiki/Slender:_The_Eight_Pages) game. + +### Objectives + +Just like in the Slender game, the goal of your game should be to get all the 8 pages spread around the map in different locations, while being chased by a monster/creature (a "Creep"). + +To find models of scary monsters/creatures, you can easily choose checking the [Mixamo website](https://www.mixamo.com/#/). Or you can use the models on the ["Creeps.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/Creeps.zip) file as well as the [assets](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/ThePages.zip) (basics animations, character, enemies and props) you will need for this project. + +### Instructions + +On starting the game, it should ask the player to press a button to enter the game. Once the player does that, the actual gameplay level should be loaded. + +The map for your game should be a large squared landscape terrain, scaled at 10 by 10 units. The action should be happening at night time in a forest-like environment. Your map should contain: + +- trees, some little facilities (like shelters or little buildings), monuments etc... You should use the [Foliage Tool](https://docs.unrealengine.com/en-US/BuildingWorlds/Foliage/index.html) to spread trees, rocks and grass around the landscape and to make them have different sizes, scales and rotations. + - To create buildings, you will be using the built in [BSP](https://www.worldofleveldesign.com/categories/ue4/bsp-01-what-is-bsp.php). This method will allow you to create complex meshes and apply textures to it (Useful when you have no 3D modeling skill like me). +- 8 pages spread around the map in the facilities or monuments you created, but should be placed in different spots of those locations in each game. +- at least three different kind of floor surface: dirt, grass and concrete. + +For the creature or monster that you choose to do: + +- It can only move (very slowly so it does not catch up to the player that quickly) when it is not on the player field of view. This means if the player sees it, it should stop. + - Randomly, the "Creep" should teleport to another location. +- The "Creep" never appears before the player collects at least 1 page on the map. +- While completing the task of collecting the 8 pages, the monster should randomly disturb our experience by appearing on the player screen, making that task more difficult. +- When the creep is on the player sight, a disturbing music/sound must be played and the camera should start stuttering like in the original game. + +The player should control a FPS (First Person Shooter) Character that: + +- has to collect 8 pages placed around the map. + - The player can collect the pages by left-clicking on them. + - A sound should be played when the player collects a page and a text should appear temporarily on screen showing how many pages are missing (example: 5 / 8 Pages). +- can toggle a flashlight on and off by pressing the "F" key. + - A sound should be played when toggling the flashlight on or off. +- when walking, should produce the sound of footsteps on the floor. + - The sound of player footsteps should be different on at least 3 different surfaces: concrete, dirt and grass. + - Once the player collects the 8 pages, the forest turns from night to day for a while and then the game ends and the credits show up on the screen. + - The credits should mention the names of the developers. + +If you want you could try to play the real game [Slender: The Eight Pages](https://pt.wikipedia.org/wiki/Slender:_The_Eight_Pages) to get a feel of what your game should look like. + +> Do not forget to zip up the project compile and save everything for peer correction. diff --git a/subjects/the-pages/audit/README.md b/subjects/the-pages/audit/README.md new file mode 100644 index 000000000..493e5f4d8 --- /dev/null +++ b/subjects/the-pages/audit/README.md @@ -0,0 +1,55 @@ +### Functional + +###### When you open the game, do you have to press a button to start playing? + +###### Is the map a large squared landscape terrain, scaled at 10 by 10 units? + +###### Is the action happening at night time in a forest-like environment? + +###### Does the map contain tress, little facilities (like shelters or little buildings), monuments, rocks and grass around the landscape? + +###### Were the buildings created using [BSP](https://www.worldofleveldesign.com/categories/ue4/bsp-01-what-is-bsp.php)? + +###### Does the map contain 8 pages spread around the map in the facilities or monuments the student created? + +###### Does the map contains at least three different types of floor surface: dirt, grass and concrete. + +###### If you exit and re-enter the game, did the pages changed spots on the locations? + +###### Does the monster stop if it enters the field of view of the player? + +###### Does the "Creep" randomly teleports to another location? + +###### Does the "Creep" only appears after the player collects one page? + +###### Does the monster makes the task of collecting the 8 pages more difficult? + +###### Does a music/sound gets played and the camera starts to stutter when the creature appears in the sight of the player? + +###### Is the player controlling a FPS (First Person Shooter) character? + +###### Can the player move around using the WASD keys and look around using mouse input? + +###### Can the player collect the pages by left-clicking on them? + +###### Is a sound played when the player collects a page? + +###### Is it displayed a text saying how many pages there are left, every time the player collects a page? + +###### Can the player toggle a flashlight on or off when pressing the "F" key? + +###### Is a sound played when toggling the flashlight on or off? + +###### Can you hear the sound of the player footsteps when he walks? + +###### Is there three different sounds to the footsteps, when on dirt, grass and concrete? + +###### Does the forest turns from night time to day time when the player collects all of the 8 pages? + +###### When finishing the game, does the credits (names of the developers) show up? + +### Bonus + +###### Does the game contain a 3D Main menu? + +###### Is the creature different from the one provided? diff --git a/subjects/vehiclephysics/README.md b/subjects/vehiclephysics/README.md index 9c2237960..8a1e58228 100644 --- a/subjects/vehiclephysics/README.md +++ b/subjects/vehiclephysics/README.md @@ -47,3 +47,5 @@ As bonus objectives you can: - Create steam/flames particles going out from the car exhaust. - Animate the character entering and sitting in the car. - Add a button to open the doors while inside the car without exiting it. + +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. diff --git a/subjects/widgetfactory/README.md b/subjects/widgetfactory/README.md index a25e160a8..700a19954 100644 --- a/subjects/widgetfactory/README.md +++ b/subjects/widgetfactory/README.md @@ -29,6 +29,7 @@ When the player clicks on the Graphics Settings button, another widget should ap - a slider that lets the player choose the percentage of the resolution scale. - a dropdown menu where the player can choose the resolution. + - At least three different resolutions should be displayed in the dropdown. - an apply button at the bottom of the Widget which actualizes the two above resolution settings. @@ -36,9 +37,11 @@ When the player clicks on the Graphics Settings button, another widget should ap - a checkbox, which when switched on, shows the game in full screen and in windowed mode otherwise. - four choices for PostProcessQuality, ShadowQuality, TextureQuality, EffectQuality and FoliageQuality. These four choices are LOW, MEDIUM, HIGH and EPIC. + - These settings have to be executed with the “Execute Console Command” node. - PostProcessAAQuality setting should have the following options as buttons: Off, 2x, 4x, 6x. + - You can use the “append (string)” node to switch between all four choices. - A “Back” button that bring the player back to the main Start menu. @@ -60,3 +63,5 @@ As bonuses you can: - Add a resolution confirmation button when changing resolution. - Use the “On Release” attribute of the buttons, instead of the "On Pressed". Automatically set the default screen resolution to get the best computer performance. + +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. diff --git a/subjects/zombieai/README.md b/subjects/zombieai/README.md index ffd332f4a..34d94920b 100644 --- a/subjects/zombieai/README.md +++ b/subjects/zombieai/README.md @@ -75,3 +75,5 @@ To make the game more interesting you could: - Implement a point system, in which every time the player kills a zombie, pass wave, etc…, the points gets higher. - Add creepy music during the game, add sound at each new wave, etc… - Make the player have to reload the weapon, in other words, make the gun go out of ammo. + +[Here](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf9sxZqgfPVM06PrLk8_CWA-) you can find an instructional playlist on Unreal Engine. From 33b398254703eaedcbbefe94987879b9cda49df2 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Thu, 14 Jan 2021 15:20:05 +0000 Subject: [PATCH 02/42] little correction --- subjects/jumpo/audit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/jumpo/audit/README.md b/subjects/jumpo/audit/README.md index c722a1c03..9a248703a 100644 --- a/subjects/jumpo/audit/README.md +++ b/subjects/jumpo/audit/README.md @@ -74,4 +74,4 @@ ###### Are there different map backgrounds? -###### Can the coins/gems be used in an in-game store to buy skins/perks other than invincibility? +###### Can the coins/gems be used in an in-game store to buy skins or perks? From 299958c5efa601f47379db353a73d7eed1e58c3c Mon Sep 17 00:00:00 2001 From: Augusto Date: Mon, 18 Jan 2021 19:28:01 +0000 Subject: [PATCH 03/42] Add exercise subject for matrix_transposition_4by3 --- subjects/matrix_transposition/README.md | 2 +- subjects/matrix_transposition_4by3/README.md | 67 ++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 subjects/matrix_transposition_4by3/README.md diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index eaae796f8..a1d479fe2 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -13,7 +13,7 @@ Example: ``` -( a b ) __ transposition __> ( a d ) +( a b ) __ transposition __> ( a d ) ( c d ) ( b d ) ``` diff --git a/subjects/matrix_transposition_4by3/README.md b/subjects/matrix_transposition_4by3/README.md new file mode 100644 index 000000000..7b2ba7fe5 --- /dev/null +++ b/subjects/matrix_transposition_4by3/README.md @@ -0,0 +1,67 @@ +## matrix_transposition + +### Instructions + +- Define the structure matrix as a tuple of tuples of `i32`'s + +- Define a function that calculate the transpose matrix of a 4x3 matrix (4 rows by 3 columns) which is a 3x4 matrix (3 rows by 4 columns). + +- Note: + + - The transpose of a matrix `A` is the matrix `A'` where `A'`'s columns are `A`'s row and the rows are the columns: + +Example: + +``` +( a b ) __ transposition __> ( a d ) +( c d ) ( b d ) +``` + +- Matrix must implement Debug, PartialEq and Eq. You can use derive + +- Remember that you're defining a library so you have to make public the elements that are going to be called from an external crate. + +### Notions + +[Chapter 7]( https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html ) + +### Expected Function + +```rust +pub struct Matrix4by3( + pub (i32, i32, i32), + pub (i32, i32, i32), + pub (i32, i32, i32), + pub (i32, i32, i32), +); + +pub struct Matrix3by4( + pub (i32, i32, i32, i32), + pub (i32, i32, i32, i32), + pub (i32, i32, i32, i32), +); + +pub fn transpose(m: Matrix4by3) -> Matrix3by4 { +} +``` + +### Usage + +Here is a posible program to test your function + +```rust +fn main() { + let matrix = Matrix4by3((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)); + println!("Original matrix {:?}", matrix); + println!("Transpose matrix {:?}", transpose(matrix)); +} +``` + +And it's output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +Original matrix Matrix4by3((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) +Transpose matrix Matrix3by4((1, 4, 7, 10), (2, 5, 8, 11), (3, 6, 9, 12)) +student@ubuntu:~/[[ROOT]]/test$ +``` From f3eac5a510f01f9edca354b7167aa08ef5ca3e14 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 19 Jan 2021 17:29:11 +0000 Subject: [PATCH 04/42] Add exercise insertion_sort --- .../insertion_sort/Insertion-Sort-demo.jpg | Bin 0 -> 67860 bytes subjects/insertion_sort/README.md | 58 ++++++++++++++++++ subjects/matrix_transposition_4by3/README.md | 10 +-- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 subjects/insertion_sort/Insertion-Sort-demo.jpg create mode 100644 subjects/insertion_sort/README.md diff --git a/subjects/insertion_sort/Insertion-Sort-demo.jpg b/subjects/insertion_sort/Insertion-Sort-demo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cbe8848ff52f75f6bd25402d8869a18ab5a1a3e6 GIT binary patch literal 67860 zcmd432|Sd4-!Fcl8cR&}-Bi{RDqA5_2}zO?MNC<;g(M8dj3v8FQIyK0lw_Ig6=v*H zN!G{`GbDt}h;cF7xw_ANp8L7)-*e7+{^xa;|HT(Gb1mP`clj*u&-;V-l}81(ov^a8 z0{Hm&fJ@L9z#9cD0DeBcKi_{p1U3u&Iks%tB(NE_1qS=m1cgL|1O=@{CV3YV}i5>fnY>{-h z4BHtZwLk7ofuQQqie~9Ey>vBwkL&S5!ZNaQ@(Su2np(Sd8yFfHA2?`Yam>=n`nb)B zvySJSoX=ly@$~Y(;^XV*A9^D!JOUjVm2fjLDLExIEi3!(y`0?p5AvQqD}4T<=w%;XZ#WEZ<77z1dIP)lI-6E`-fa3z*Yf1Xz~Qa0VKd-KTXpD{{PuZ zisoxwYT7>;)rAl3A13FTSnjMpI`Qq23BvQR%*&@~fY$$}#;)N33CXyt_G!qMU_VPa`#F3uCNiM(YapuLPKeKOMD`9IP~p_d1CEtp zKBJt1joX?(RNuWyeA;^zKZ`Z)ymq5O=Y7SEVk<)*lUHXQPMoPO3i4Br2sVm7C*^=T zi8I?Q<#71_MU%qVmBQiZ;L`(2FI^S=bmi)RO=l>`SYkesdY>S^f*e6mf7LLYZRpXU z)fC0$%cnZN=X#vNoiVA`_g@qE-L&!wM?XWzbnc={QjlV1aOuUhwnp5k%vQUaB#kDP z?dJV5vj9HQZ~<9KY!(R~u40DJQE@tZJ?NzD&8e#31IHlq^{bD1U{4$@rGWoUjSn2+ z0We$K2OH3m2VCm1<^figsOKp9DZTZ*~aC)4(#q)x^cp) zThLl$b??G-BjHkKWJp1H)30lyA>>NpqA`s;DnL!TGsOdh8r$+@YRC&eZfMPTN*`2y zD_zB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7M>Dn0_F&qI;!_ zr_6co!K<>J*LX^KEQhqYa&MBsh=NhK7D8$JN?9JH(5llwELy6ps ( a d ) -( c d ) ( b d ) +( a b c ) __ transposition __> ( a d g j ) +( d e f ) ( b e h k ) +( g h i ) ( c f i l ) +( j k l ) ``` - Matrix must implement Debug, PartialEq and Eq. You can use derive @@ -25,7 +27,7 @@ Example: [Chapter 7]( https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html ) -### Expected Function +### Expected Function and Structs ```rust pub struct Matrix4by3( From 6558e9cd9cb7f3b779adf602c4a5664cccfe028d Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 19 Jan 2021 22:55:58 +0000 Subject: [PATCH 05/42] Add exercise `matrix_display`s subject --- subjects/insertion_sort/README.md | 2 -- subjects/matrix_display/README.md | 44 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 subjects/matrix_display/README.md diff --git a/subjects/insertion_sort/README.md b/subjects/insertion_sort/README.md index c469e1488..550ec7372 100644 --- a/subjects/insertion_sort/README.md +++ b/subjects/insertion_sort/README.md @@ -19,8 +19,6 @@ Here is a visual example of sorting a slice step by step using the insertion sor - Implement the algorithm insertion sort by creating a function `insertion_sort(slice, steps)` that executes the iterations of the algorithm the number of steps indicated by the parameter `steps`. See the [Usage](#usage) for more information. -### Notion - ### Expected Function ```rust diff --git a/subjects/matrix_display/README.md b/subjects/matrix_display/README.md new file mode 100644 index 000000000..d5acc7954 --- /dev/null +++ b/subjects/matrix_display/README.md @@ -0,0 +1,44 @@ +## matrix_display + +### Instructions + +Use the Matrix struct given in the [expected struct](#expected-functions-and-struct) and implement the `std::fmt::Display` trait so it prints the matrix like in the [usage](#usage). + +You will also have to implement the associated function `new` that creates a matrix from a slice of slices. + +### Expected Functions and Struct + +```rust +pub struct Matrix(pub Vec>); + +pub fn new(slice: &[&[i32]]) -> Self { +} + +use std::fmt; + +impl fmt::Display for Matrix { +} +``` + +### Usage + +Here is a possible program to test your function + +```rust +use matrix_display::*; + +fn main() { + let matrix = Matrix::new(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]); + println!("{}", matrix); +} +``` + +And it's output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +(1 2 3) +(4 5 6) +(7 8 9) +student@ubuntu:~/[[ROOT]]/test$ +``` From a8d535af9985d7f1e7a28fc999b84518ed9a59e5 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 25 Jan 2021 15:45:03 +0000 Subject: [PATCH 06/42] 1st big project --- subjects/the-pages/README.md | 27 ++++++++++++++++----------- subjects/the-pages/audit/README.md | 14 +++++++------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/subjects/the-pages/README.md b/subjects/the-pages/README.md index f27f88461..67f6fc472 100644 --- a/subjects/the-pages/README.md +++ b/subjects/the-pages/README.md @@ -1,31 +1,36 @@ ## the-pages -In this exercise, create a mini-horror game inspired on ["Slender: The Eight Pages"](https://en.wikipedia.org/wiki/Slender:_The_Eight_Pages) game. +In this exercise, one will create a mini-horror game inspired on ["Slender: The Eight Pages"](https://en.wikipedia.org/wiki/Slender:_The_Eight_Pages) game. ### Objectives -Just like in the Slender game, the goal of your game should be to get all the 8 pages spread around the map in different locations, while being chased by a monster/creature (a "Creep"). +Just like in the Slender game, the goal of your game should be, while being chased by a monster/creature (a "Creep"), to get all the 8 pages spread around the map in different locations. -To find models of scary monsters/creatures, you can easily choose checking the [Mixamo website](https://www.mixamo.com/#/). Or you can use the models on the ["Creeps.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/Creeps.zip) file as well as the [assets](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/ThePages.zip) (basics animations, character, enemies and props) you will need for this project. +To find models of scary monsters/creatures: +- you can easily choose checking the [Mixamo website](https://www.mixamo.com/#/). + +- alternatively, you can use the models on the ["Creeps.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/Creeps.zip) file. + +- you can also check in the [assets](https://assets.01-edu.org/Unreal-Engine-Projects/ThePages/ThePages.zip) (basics animations, character, enemies and props) you will need for this project. ### Instructions -On starting the game, it should ask the player to press a button to enter the game. Once the player does that, the actual gameplay level should be loaded. +On startin, the game should ask the player to press a button to enter the game. Once the player does that, the actual gameplay level should be loaded. The map for your game should be a large squared landscape terrain, scaled at 10 by 10 units. The action should be happening at night time in a forest-like environment. Your map should contain: - trees, some little facilities (like shelters or little buildings), monuments etc... You should use the [Foliage Tool](https://docs.unrealengine.com/en-US/BuildingWorlds/Foliage/index.html) to spread trees, rocks and grass around the landscape and to make them have different sizes, scales and rotations. - - To create buildings, you will be using the built in [BSP](https://www.worldofleveldesign.com/categories/ue4/bsp-01-what-is-bsp.php). This method will allow you to create complex meshes and apply textures to it (Useful when you have no 3D modeling skill like me). -- 8 pages spread around the map in the facilities or monuments you created, but should be placed in different spots of those locations in each game. -- at least three different kind of floor surface: dirt, grass and concrete. + - To create buildings, you will be using the built in [BSP](https://www.worldofleveldesign.com/categories/ue4/bsp-01-what-is-bsp.php). This method will allow you to create complex meshes and apply textures to it (Useful when you have no 3D modeling skills). +- the map should also contain 8 pages spread around it in the facilities or monuments you created, but should be placed in different spots of those locations in each game. +- the map should have at least three different kind of floor surface: dirt, grass and concrete. -For the creature or monster that you choose to do: +For the creature or monster that you choose to design: -- It can only move (very slowly so it does not catch up to the player that quickly) when it is not on the player field of view. This means if the player sees it, it should stop. +- It can only move (very slowly so it does not catch up to the player that quickly) when it is not within the player field of view. This means if the player sees it, it should stop. - Randomly, the "Creep" should teleport to another location. - The "Creep" never appears before the player collects at least 1 page on the map. - While completing the task of collecting the 8 pages, the monster should randomly disturb our experience by appearing on the player screen, making that task more difficult. -- When the creep is on the player sight, a disturbing music/sound must be played and the camera should start stuttering like in the original game. +- When the creep is within the player's sight, a disturbing music/sound must be played and the camera should start stuttering like in the original game. The player should control a FPS (First Person Shooter) Character that: @@ -34,7 +39,7 @@ The player should control a FPS (First Person Shooter) Character that: - A sound should be played when the player collects a page and a text should appear temporarily on screen showing how many pages are missing (example: 5 / 8 Pages). - can toggle a flashlight on and off by pressing the "F" key. - A sound should be played when toggling the flashlight on or off. -- when walking, should produce the sound of footsteps on the floor. +- when walking should produce the sound of footsteps on the floor. - The sound of player footsteps should be different on at least 3 different surfaces: concrete, dirt and grass. - Once the player collects the 8 pages, the forest turns from night to day for a while and then the game ends and the credits show up on the screen. - The credits should mention the names of the developers. diff --git a/subjects/the-pages/audit/README.md b/subjects/the-pages/audit/README.md index 493e5f4d8..39aff0862 100644 --- a/subjects/the-pages/audit/README.md +++ b/subjects/the-pages/audit/README.md @@ -1,22 +1,22 @@ ### Functional -###### When you open the game, do you have to press a button to start playing? +###### When you open the game, is there a button to press to start playing? ###### Is the map a large squared landscape terrain, scaled at 10 by 10 units? ###### Is the action happening at night time in a forest-like environment? -###### Does the map contain tress, little facilities (like shelters or little buildings), monuments, rocks and grass around the landscape? +###### Does the map contain trees, little facilities (like shelters or little buildings), monuments, rocks and grass around the landscape? ###### Were the buildings created using [BSP](https://www.worldofleveldesign.com/categories/ue4/bsp-01-what-is-bsp.php)? ###### Does the map contain 8 pages spread around the map in the facilities or monuments the student created? -###### Does the map contains at least three different types of floor surface: dirt, grass and concrete. +###### Does the map contains at least three different types of floor surfaces: dirt, grass and concrete? ###### If you exit and re-enter the game, did the pages changed spots on the locations? -###### Does the monster stop if it enters the field of view of the player? +###### Does the monster come to standstill if it enters the field of view of the player? ###### Does the "Creep" randomly teleports to another location? @@ -34,7 +34,7 @@ ###### Is a sound played when the player collects a page? -###### Is it displayed a text saying how many pages there are left, every time the player collects a page? +###### Is a text displayed stating how many pages are left every time the player collects a page? ###### Can the player toggle a flashlight on or off when pressing the "F" key? @@ -42,11 +42,11 @@ ###### Can you hear the sound of the player footsteps when he walks? -###### Is there three different sounds to the footsteps, when on dirt, grass and concrete? +###### Are there three different sounds to the footsteps, when on dirt, grass and concrete? ###### Does the forest turns from night time to day time when the player collects all of the 8 pages? -###### When finishing the game, does the credits (names of the developers) show up? +###### When finishing the game, do the credits (names of the developers) show up? ### Bonus From f41bdcb73e2b0145048be97429a04250935fae29 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 25 Jan 2021 16:42:01 +0000 Subject: [PATCH 07/42] second big project reviewed --- subjects/stealth-boom/README.md | 24 ++++++++++----------- subjects/stealth-boom/audit/README.md | 30 +++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/subjects/stealth-boom/README.md b/subjects/stealth-boom/README.md index f625ee6e9..f2c483b7c 100644 --- a/subjects/stealth-boom/README.md +++ b/subjects/stealth-boom/README.md @@ -4,7 +4,7 @@ In this project, you will have to create an entire stealth game using Unreal Eng ### Objectives -The idea of this project is to create a little 10 minutes gameplay game with missions, stealth based gameplay and AI patrolling NPC. +The idea of this project is to create a little 10 minutes gameplay game with missions, with stealth based gameplay and with an AI patrolling NPC. The basics assets you will need for this project can be found in the [Stealth-Boom.zip](https://assets.01-edu.org/Unreal-Engine-Projects/StealthBoom.zip) file. It contains the basic animations, character, enemies and props you will need for this project. @@ -14,7 +14,7 @@ The following aspects should be fulfilled: - Create a map where the player can walk around. - - This map should contain places for the player to hide from enemies by crouching, hide behind walls, and all other props you may use to help to make a stealth game. + - This map should contain places for the player to hide from enemies by crouching, hide behind walls, and all other props you may use to help it make a stealth game. - Buildings with at least 2 floors. - Pickable ammunition and weapons around the map. @@ -36,35 +36,35 @@ The following aspects should be fulfilled: - Start the game - Adjust the general sound of the game - Change the graphics settings - - When changing the resolution, a pop-up should appear in the middle of the screen asking if the player wants to keep the graphics setting he/she just applied. If `Yes` is clicked within 10 seconds, the settings are set, otherwise, if the 10 seconds delay is over or if the player click `No`, the settings go back to the old ones. + - When changing the resolution, a pop-up should appear in the middle of the screen asking if the player wants to keep the graphics setting he/she just applied. If `Yes` is clicked within 10 seconds, the settings are set, otherwise, if the 10 seconds delay is over or if the player clicks `No`, the settings go back to the old ones. - Change the mouse sensitivity - - Invert mouse vertical axis + - Invert the mouse vertical axis -- You should have at least 3 types of enemies: `Guards` (patrol around and are look for intruders), `Drones` (same as Guards but can fly), and `Cameras` (stationary and look for intruders). More enemies can be added if you want to. +- You should have at least 3 types of enemies: `Guards` (who patrol around and are lookig for intruders), `Drones` (same as Guards but which can fly), and `Cameras` (stationary and looking for intruders). More enemies can be added if you want to. - Guards AI: - Guards should be able to patrol around the map; - A Guard is able to see the player, if the player crosses his field of view; - - When the player enters the field of view of a Guard, the Guard enters into chase mode and must start running after the player, take cover and shooting at the player. + - When the player enters the field of view of a Guard, the Guard enters into chasing mode and must start running after the player, takes cover and shoots at the player. - If the player leaves the field of view for a certain time, the Guard goes back to patrol mode. - Drones AI: - Drones should be able to patrol around the map; - A light color should determine the state of the drone (Blue for patrolling, Red for chasing the player); - - Once the player crosses the drone camera, the drone light turns red and the drone enters chase mode; - - When a drone is in chase mode, all the guards on the area are alerted, and should enter chase mode as well; + - Once the player crosses the drone camera, the drone light turns red and the drone enters chasing mode; + - When a drone is in chasing mode, all the guards on the area are alerted, and should enter chasing mode as well; - When the player is out of the drone sight, the drone turns back to patrol mode; - The sight radius should be inferior on the drones that on the guards. - Camera AI: - Cameras should be placed on walls; - - Cameras should have the same light sign as the drone, so when the player is in the camera sight, the camera light turns red and all Guards enter in chase mode; - - As the Drones, Cameras warn guards, whenever the player passes through the camera field of view; + - Cameras should have the same light sign as the drone, so when the player is in the camera sight, the camera light turns red and all Guards enter in chasing mode; + - Like the Drones, Cameras warn guards, whenever the player passes through the camera field of view; - Some Cameras should lock access of certain areas of the map (for example, close doors) when the player is detected by that camera. -- Drones, Guards and Cameras should have sounds effect whenever they change from chase to patrol mode, as wel as the other way around. +- Drones, Guards and Cameras should have sounds effect whenever they change from chase to patrol mode, as well as the other way around. - All AI should be implemented using Behavior Trees except for the Camera. -- The player mission is up to you, either it can be some task to fix, kill all guards without getting caught or collect documents... Whatever you choose, the player should have enemies on his way to diver him away from his objective. +- The player mission is up to you, either it can be some task to fix, kill all guards without getting caught or collect documents... Whatever you choose, the player should have enemies on his way to divert him away from his objective. - When the player successfully completes his mission, a pop up should appear saying that the mission is completed. diff --git a/subjects/stealth-boom/audit/README.md b/subjects/stealth-boom/audit/README.md index 7e27c5a95..11bf3e45f 100644 --- a/subjects/stealth-boom/audit/README.md +++ b/subjects/stealth-boom/audit/README.md @@ -4,15 +4,15 @@ ###### Does the map contain buildings, pickable ammunition and weapons placed around the map? -###### Does the player has all the minimal animation required (walking, running, melee attacking, aiming, reloading, shooting, crouching, crouch walking, crouch aiming, crouch reloading, crouch shooting)? +###### Does the player have all the minimal animation required (walking, running, melee attacking, aiming, reloading, shooting, crouching, crouch walking, crouch aiming, crouch reloading, crouch shooting)? ###### Is there a sound for the player shooting? -###### Are there bullets impact when shooting at a wall? +###### Are there bullets impacts present when shooting at a wall? -###### When the player is hit are there any blood particles? +###### When the player is hit, are there any blood particles? -###### A main menu with the five options is displaying on the screen? +###### Is a main menu with the five options displayed on the screen? ###### Can the general sound of the game be managed directly on the settings menu? @@ -22,15 +22,15 @@ ###### Are the mouse settings (mouse sensitivity, invert mouse vertical axis) functioning according to their descriptions? -###### Does the guards and drones wander around the map? +###### Do the guards and drones wander around the map? -###### When a player enters the field of view of a guard does he switches to chase mode, running and shooting towards the player while also taking cover? +###### When a player enters the field of view of a guard, does he switches to chasing mode, running and shooting towards the player while also taking cover? -###### Does the drone light switches between each state? Blue for patrolling and red for chase mode (when a player crosses his sight)? +###### Does the drone light switches between each state? Blue for patrolling and red for chase mode (when a player crosses its sight)? -###### Whenever a drone turns to chase mode, do all the guards on the area get alerted and switch to chase mode as well? +###### Whenever a drone turns to chasing mode, do all the guards in the area get alerted and switch to chasing mode as well? -###### Does the drone comes back to patrol mode when the player is out of the drone sight? +###### Does the drone come back to patrol mode when the player is out of the drone sight? ###### Is the sight radius of the drones smaller than the guards? @@ -38,13 +38,13 @@ ###### Do cameras have similar light sign as the drones (red for alert mode and blue for patrol)? -###### As the drones, do the cameras alert guards on the area, switching them to chase mode? - -###### Do some cameras lock access to certain areas of the map, when they detect a player? +###### As the drones, do the cameras alert guards on the area, switching them to chasing mode? ###### Do Guards, Drones and Cameras play an alert sound when a player gets detected? -###### Does the camera can close some part of the map (Doors, open traps and kill the player etc…) to the player when the player is being detected? +###### Do some cameras lock access to certain areas of the map, when they detect a player? + +###### Can the camera close some part of the map (thru closed doors, open traps and tries to kill the player etc…) to the player when the player is being detected? ###### Are Behavior Trees used to implement the AI of the Guards and Drones? @@ -56,11 +56,11 @@ ###### Does the player health decreases when he gets shot by the guards? -###### When the player loses all his health (dies), does he get to choose either to quit the game, go back to the main menu or to start over? +###### When the player loses all his health (dies), does he get to choose whether to quit the game, go back to the main menu, or to start over? ###### If the player starts over does he spawn back at the starting point? -###### The lifespan of the game is at least 6 minutes long from launch to mission complete? +###### Is the lifespan of the game at least 6 minutes long from launch to mission completed? #### Bonus From b3167f411417871814b3e87b2500f4e9fe862077 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Mon, 25 Jan 2021 17:07:58 +0000 Subject: [PATCH 08/42] rust exercises for exams --- subjects/matrix_determinant/README.md | 56 +++++++++++++++++ subjects/order_books/README.md | 91 +++++++++++++++++++++++++++ subjects/partial_sums/README.md | 67 ++++++++++++++++++++ 3 files changed, 214 insertions(+) create mode 100644 subjects/matrix_determinant/README.md create mode 100644 subjects/order_books/README.md create mode 100644 subjects/partial_sums/README.md diff --git a/subjects/matrix_determinant/README.md b/subjects/matrix_determinant/README.md new file mode 100644 index 000000000..09efd5ae6 --- /dev/null +++ b/subjects/matrix_determinant/README.md @@ -0,0 +1,56 @@ +## matrix_determinant + +### Instructions + +Write a matrix_determinant function that receives a 3x3 matrix ([[isize; 3]; 3]) and returns its determinant (isize). + +This is how you calculate a 2x2 matrix determinant: + +```sh +|a b| +|c d| + +a*d - b*c +``` + +To calculate a 3x3 matrix determinant (below) you have to take 'a' and multiply it by the determinant of the matrix you get if you get rid of 'a' column and row. Then you subtract the multiplication of 'b' and the determinant of the matrix you get if you get rid of 'b' column and row. And finally, you do the same process for 'c' and add it to the previous result. + +```sh +|a b c| +|d e f| +|g h i| +``` + +### Expected Function + +```rs +pub fn matrix_determinant(matrix: [[isize; 3]; 3]) -> isize { + +} +``` + +### Example + +Here is a program to test your function: + +```rs +fn main() { + let matrix = [[1, 2, 4], [2, -1, 3], [4, 0, 1]]; + + println!( + "The determinant of the matrix:\n|1 2 4|\n|2 -1 3| = {}\n|4 0 1|", + matrix_determinant(matr) + ); +} +``` + +And its output: + +```sh +$ cargo run +The determinant of the matrix: +|1 2 4| +|2 -1 3| = 35 +|4 0 1| +$ +``` diff --git a/subjects/order_books/README.md b/subjects/order_books/README.md new file mode 100644 index 000000000..e527a3993 --- /dev/null +++ b/subjects/order_books/README.md @@ -0,0 +1,91 @@ +## order_books + +### Instructions + +Build a module called `library` with two sub-modules inside it: + +- `writers` which contains a structure called `Writer` that has a first_name (String), last_name (String) and a set of books (Vec\). +- `books` which contains a structure called `Book` that has a title (String) and a year of publish (u64). + +You will also have to create (outside the previous modules) a function `order_books` that receives a writer (Writer) and orders the set of books alphabetically. + +### Expected Functions and Structs + +```rs +pub fn order_books(writer: &mut Writer) { + +} +``` + +```rs +struct Writer { + +} +``` + +```rs +struct Book { + +} +``` + +### Example + +Here is a program to test your function and structs: + +```rs +fn main() { + let mut writer_a = Writer { + first_name: "William".to_string(), + last_name: "Shakespeare".to_string(), + books: vec![ + Book { + title: "Hamlet".to_string(), + year: 1600, + }, + Book { + title: "Othelo".to_string(), + year: 1603, + }, + Book { + title: "Romeo and Juliet".to_string(), + year: 1593, + }, + Book { + title: "MacBeth".to_string(), + year: 1605, + }, + ], + }; + + println!("Before ordering"); + for b in &writer_a.books { + println!("{:?}", b.title); + } + + order_books(&mut writer_a); + + println!("\nAfter ordering"); + for b in writer_a.books { + println!("{:?}", b.title); + } +} +``` + +And its output: + +```sh +$ cargo run +Before ordering +"Hamlet" +"Othelo" +"Romeo and Juliet" +"MacBeth" + +After ordering +"Hamlet" +"MacBeth" +"Othelo" +"Romeo and Juliet" +$ +``` diff --git a/subjects/partial_sums/README.md b/subjects/partial_sums/README.md new file mode 100644 index 000000000..e1d665d1b --- /dev/null +++ b/subjects/partial_sums/README.md @@ -0,0 +1,67 @@ +## partial_sums + +### Instructions + +Write a `partial_sums` function that receives a reference of an array of u64 and returns a vector with the partial sums of the received array. + +This is how partial sums work: + +1- First you split the array in its partitions: + +```sh +[1, 2, 3, 4, 5] + | + V +[1, 2, 3, 4, 5] +[1, 2, 3, 4] +[1, 2, 3] +[1, 2] +[1] +[] +``` + +2- Then you add each partition together: + +```sh +[1, 2, 3, 4, 5] = 15 +[1, 2, 3, 4] = 10 +[1, 2, 3] = 6 +[1, 2] = 3 +[1] = 1 +[] = 0 +``` + +3- So, in conclusion: + +```rs +partial_sums(&[1, 2, 3, 4, 5]) // == [15, 10, 6, 3 ,1, 0] +``` + +### Expected Result + +```rs +pub fn matrix_determinant(arr: &[u64]) -> Vec<64>{ + +} +``` + +### Example + +Here is a program to test your function: + +```rs +fn main() { + println!( + "Partial sums of [5, 18, 3, 23] is : {:?}", + parts_sums(&[5, 18, 3, 23]) + ); +} +``` + +And its output: + +```sh +$ cargo run +Partial sums of [5, 18, 3, 23] is : [49, 26, 23, 5, 0] +$ +``` From a4c02f8ef03b06f8ab080edb1186d3cabc29de73 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 25 Jan 2021 17:20:11 +0000 Subject: [PATCH 09/42] third big project reviewed for unreal engine --- subjects/jumpo/README.md | 16 ++++++------- subjects/jumpo/audit/README.md | 44 +++++++++++++++++----------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/subjects/jumpo/README.md b/subjects/jumpo/README.md index c6d01a455..499815e25 100644 --- a/subjects/jumpo/README.md +++ b/subjects/jumpo/README.md @@ -1,10 +1,10 @@ ## jumpo -In this project, you will have to create a 2D sidescroller game. You will be using for the first time an external SDK to compile your game: the Android SDK Tool for Unreal Engine, that allows you to create a [.apk file](https://fileinfo.com/extension/apk) that can be installed and played on any Android devices. +In this project, you will have to create a 2D sidescroller game. You will be using for the first time an external SDK to compile your game: the Android SDK Tool for Unreal Engine, which allows you to create a [.apk file](https://fileinfo.com/extension/apk) that can be installed and played on any Android devices. ### Objectives -In this game for Android the player will control a character in a similar game to Google Chrome Running Dinosaur but with coins or gems. So the game will have buttons on screen and that will be bound to character actions like jumping, ducking, etc... Another goal of this project is the sprite and [flipbook](https://docs.unrealengine.com/en-US/AnimatingObjects/Paper2D/Flipbooks/index.html) creation that is used to animate 2D art. +In this game for Android, the player will control a character in a similar game than the Google Chrome Running Dinosaur but with coins or gems. So the game will have buttons on screen and that will be bound to character actions like jumping, ducking, etc... Another goal of this project is the sprite and [flipbook](https://docs.unrealengine.com/en-US/AnimatingObjects/Paper2D/Flipbooks/index.html) creation that is used to animate 2D art. The basic assets you will need for this project can be found in the ["Jumpo.zip"](https://assets.01-edu.org/Unreal-Engine-Projects/Jumpo/Jumpo.zip) file. @@ -15,7 +15,7 @@ The following are the requirements for this project: - This game should have a main menu that must have a: - Start button, that loads the game. - - Stats button, that shows you how many coins you’ve collected overall, how many times you died, number of games and highest score. You can add more information if you want to. + - Stats button, that shows you how many coins you have collected overall, how many times you died, the number of games done and the highest score. You can add more information if you want to. - Leaderboard button, that shows the 5 highest scores ever made. - Credits button, that shows the names of the developers that worked on the project. - Character button, that shows the locked and unlocked characters. @@ -33,10 +33,10 @@ These are the requirements regarding the game map: For the character these are the requisites: -- You are free to choose what character you want to use in your game. You can use the resource ones or you can check [this website](https://www.spriters-resource.com/) for more characters and sprites. +- You are free to choose which character you want to use in your game. You can use the resource ones or you can check [this website](https://www.spriters-resource.com/) for more characters and sprites. - The character should be "running" from left to right, so the character must be headed right. - The character should actually be static in relation to the background and only the background is moving from right to left, giving the illusion that the character is the one moving. - - Once a part of the background is out of sight it gets destroyed or moved to the right. + - Once a part of the background is out of sight, it gets destroyed or moved to the right. - If the character does not die, the map should be infinite. - Each action (running, jumping, ducking and dying) should play a different animation (a different flipbook). - Use the .png or .tga files to extract and create a flipbook. @@ -51,7 +51,7 @@ For the character these are the requisites: - When the invincibility bar gets emptied, the character comes back to normal. - The jump and roll button should be accessible using thumbs when holding the phone (in the lower corners). - During the game, the highest ever score should appear on the top middle of the screen and the current score right below it. -- A pause button should appear somewhere on the screen but should not disturb the player experience. Top right is a good place for it. +- A pause button should appear somewhere on the screen but should not disturb the player experience. The top right corner is a good place for it. - When the player presses the pause button or when the character dies, three buttons should appear: - Retry -> Restarts the game and all progress is lost if the game is in pause. - Menu -> Goes back to the main menu and all progress is lost if the game is in pause. @@ -61,7 +61,7 @@ For the character these are the requisites: In addition to the requirements of the map and the character, these are other aspects that need to be taken into account: -- When closing the app and launching it again, all the player data should remain as he leaved before. +- When closing the app and launching it again, all the player data should remain as he leaved it before. On the main menu: @@ -70,7 +70,7 @@ On the main menu: - When first opening the game, there should be only one character unlocked. - When a player dies, the Leaderboard should be updated accordingly to the score the player just made if it is on the 5 best score ever. - Also the Stats should be updated after every game, whether it is or it is not one of the best 5 scores ever. -- On the Leaderbord and on the Stats tabs, a button to reset all the stats should be available. +- On the Leaderboard and on the Stats tabs, a button to reset all the stats should be available. #### Android diff --git a/subjects/jumpo/audit/README.md b/subjects/jumpo/audit/README.md index 9a248703a..e0853a8a4 100644 --- a/subjects/jumpo/audit/README.md +++ b/subjects/jumpo/audit/README.md @@ -1,46 +1,46 @@ #### Functional -###### A main menu is displayed at the game startup, displaying 5 options? +###### Is a main menu displayed at the game startup offering 5 options? -###### Does the Credits button shows you the names of the developers that worked on the project? +###### Does the Credits button show you the names of the developers that worked on the project? -###### Does the Quit button makes the player quit the game? +###### Does the Quit button make the player quit the game? -###### Does the Start button on the main menu starts a new game? +###### Does the Start button on the main menu start a new game? -###### Does the Character button shows you the unlockable characters and the price to unlock them? +###### Does the Character button show you the unlockable characters and the price to unlock them? -###### Does the Leaderboard button shows the 5 best scores? +###### Does the Leaderboard button show the 5 best scores? -###### Does the Stats button shows the games stats (amount of coins you’ve collected overall, how many times you died, number of games and highest score)? +###### Does the Stats button show the games stats (amount of coins you have collected overall, how many times you died, number of games and highest score)? -###### Does the maps contain obstacles that the player has to dodge? +###### Does the map contain obstacles that the player has to dodge? ###### Can you confirm that there is no 3D objects in the game? ###### Is the game meant to be played in landscape mode? -###### Is the player heading right? +###### Is the player heading on the right side? -###### Is actually the background moving from right to left, giving the illusion that the player is the one moving? +###### Is the background moving from right to left, giving the illusion that the player is the one moving? ###### Is the map infinite if the character does not hit anything? ###### Does each action (running, jumping, ducking and dying) play a different flipbook? -###### When the character hits an obstacle does he dies? +###### When the character hits an obstacle does he die? -###### When the character dies does a score screen gets displayed and the player needs to enter 3 characters to save his score in the Leaderboard? +###### When the character dies, is a score screen displayed, and the player needs to enter 3 characters to save his score in the Leaderboard? ###### If the score of the player is one of the best 5 scores ever, does the Leaderboard gets updated? ###### Can the character collect coins/gems? -###### Does the invincibility bar fills up when collecting coins/gems? +###### Does the invincibility bar fill up when collecting coins/gems? -###### Does the character becomes invincible for a little while once the player touches the invincibility bar? +###### Does the character becomes invincible for a little while once the player touch the invincibility bar? -###### When the invincibility bar gets emptied does the character comes back to normal? +###### When the invincibility bar gets emptied, does the character come back to normal? ###### Are the jump and duck/roll button accessible using thumbs when holding the phone? @@ -52,19 +52,19 @@ ###### Is a pause button available to the player? -###### Does the Retry button on the pause menu starts a new game, losing the previous progress made? +###### Does the Retry button on the pause menu start a new game, losing the previous progress made? -###### Does the Menu button on the pause menu takes the player to the main menu, losing the previous progress made? +###### Does the Menu button on the pause menu take the player to the main menu, losing the previous progress made? -###### When pressing the pause button, the game stop on the background and the retry, menu and quit button appear on screen? +###### When pressing the pause button, does the game stop on the background and the retry, menu, and quit button appear on screen? -###### Does the Quit button on the pause menu, quits the entire app? +###### Does the Quit button on the pause menu, quit the entire app? -###### When quitting the app and turning back, does the Stats and Leaderboard menu still contains data? +###### When quitting the app and turning back, does the Stats and Leaderboard menu still contain data? -###### If in the Leaderboard or Stats menu you press the reset button, is all data reset to 0? +###### If in the Leaderboard or Stats menu you press the reset button, is all the data reset to 0? -###### Is the apk is built using the latest Android SDK version? +###### Is the apk built using the latest Android SDK version? #### Bonus From 3cb2a3001db6ba395f264657a6740693a11f79b5 Mon Sep 17 00:00:00 2001 From: MSilva95 Date: Mon, 25 Jan 2021 18:28:57 +0000 Subject: [PATCH 10/42] rust exam subjecs --- subjects/counting_words/README.md | 50 ++++++++++++ subjects/division_and_remainder/README.md | 14 ++-- subjects/easy_traits/README.md | 49 ++++++++++++ subjects/lastup/README.md | 36 +++++++++ subjects/queens/README.md | 92 +++++++++++++++++++++++ subjects/rot21/README.md | 44 +++++++++++ 6 files changed, 278 insertions(+), 7 deletions(-) create mode 100644 subjects/counting_words/README.md create mode 100644 subjects/easy_traits/README.md create mode 100644 subjects/lastup/README.md create mode 100644 subjects/queens/README.md create mode 100644 subjects/rot21/README.md diff --git a/subjects/counting_words/README.md b/subjects/counting_words/README.md new file mode 100644 index 000000000..dc3edb34a --- /dev/null +++ b/subjects/counting_words/README.md @@ -0,0 +1,50 @@ +## counting_words + +### Instructions + +In this program you will have to create a function `counting_words` that +receives a `&str` and returns each word and the number of times it appears on the string. + +The program will count as a word the following: + +- A number like ("0" or "1234") will count as 1. +- A simple word or letter like ("a" or "they") will count as 1. +- Two simple words joined by a single apostrophe ("it's" or "they're") will count as 1. + +The program must respect the following rules: + +- The count is case insensitive ("HELLO", "Hello", and "hello") are 3 uses of the same word. +- All forms of punctuation have to be ignored except for the apostrophe if used like the example above. +- The words can be separated by any form of whitespace (ie "\t", "\n", " "). + +### Expected Function + +```rust +fn counting_words(words: &str) -> HashMap {} +``` + +### Usage + +Here is a possible program to test your function : + +```rust +use counting_words::counting_words; +use std::collections::HashMap; + +fn main() { + println!("{:?}", counting_words("Hello, world!")); + println!("{:?}", counting_words("“Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.” + ― Albert Einstein ")); + println!("{:?}", counting_words("Batman, BATMAN, batman, Stop stop")); +} +``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +{"hello": 1, "world": 1} +{"and": 2, "human": 1, "universe": 2, "the": 2, "i\'m": 1, "about": 1, "einstein": 1, "are": 1, "infinite": 1, "sure": 1, "albert": 1, "two": 1, "things": 1, "not": 1, "stupidity": 1} +{"batman": 3, "stop": 2} +student@ubuntu:~/[[ROOT]]/test$ +``` diff --git a/subjects/division_and_remainder/README.md b/subjects/division_and_remainder/README.md index f6a758da8..71f58c977 100644 --- a/subjects/division_and_remainder/README.md +++ b/subjects/division_and_remainder/README.md @@ -20,13 +20,13 @@ Here is a program to test you're function use division_and_remainder::division_and_remainder; fn main() { - let x = 9; - let y = 4; - let (division, remainder) = divide(x, y); - println!( - "{}/{}: division = {}, remainder = {}", - x, y, division, remainder - ); + let x = 9; + let y = 4; + let (division, remainder) = divide(x, y); + println!( + "{}/{}: division = {}, remainder = {}", + x, y, division, remainder + ); } ``` diff --git a/subjects/easy_traits/README.md b/subjects/easy_traits/README.md new file mode 100644 index 000000000..8f7c50539 --- /dev/null +++ b/subjects/easy_traits/README.md @@ -0,0 +1,49 @@ +## easy_traits + +### Instructions + +Your task is to implement the trait `AppendStr` for the type String, and `AppendVec` for a vector of strings. + +The trait `AppendStr` has only one function, which is appending `"world"` to any object implementing this trait. +And `AppendVec` will append `"three"` to a vector of strings. + +### Expected Function + +```rust +trait AppendStr { + fn append_str(self) -> Self; +} + +trait AppendVec { + fn append_vec(&mut self) -> Self; +} + +impl AppendStr for String {} + +impl AppendVec for Vec {} +``` + +### Usage + +Here is a program to test your function. + +```rust +use easy_traits::easy_traits; + +fn main() { + let s = String::from("hello ").append_str(); + println!("{}", s); + + let l = vec![String::from("one"), String::from("two")].append_vec(); + println!("{:?}", l); +} +``` + +And its output + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +hello world +["one", "two", "three"] +student@ubuntu:~/[[ROOT]]/test$ +``` diff --git a/subjects/lastup/README.md b/subjects/lastup/README.md new file mode 100644 index 000000000..8c6eb910d --- /dev/null +++ b/subjects/lastup/README.md @@ -0,0 +1,36 @@ +## lastup + +### Instructions + +Complete the `lastup` function that takes a string and puts the last letter of each word in uppercase and the rest in lowercase. + +### Expected Functions + +```rust +pub fn lastup(input: &str) -> String { +} +``` + +### Usage + +Here is a program to test your function. + +```rust +use lastup::lastup; + +fn main() { + println!("{}", lastup("joe is missing")); + println!("{}", lastup("jill is leaving A")); + println!("{}",lastup("heLLo THere!")); +} +``` + +And its output + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +joE iS missinG +jilL iS leavinG A +hellO therE! +student@ubuntu:~/[[ROOT]]/test$ +``` diff --git a/subjects/queens/README.md b/subjects/queens/README.md new file mode 100644 index 000000000..493b71ff9 --- /dev/null +++ b/subjects/queens/README.md @@ -0,0 +1,92 @@ +## queens + +### Instructions + +In a chess game, a queen can attack pieces which are on the same row, +column, or diagonal. + +Your purpose in this exercise is to find out if two queens can attack +each other using the same rules. + +The chess board will be represented as an 8 by 8 array. + +So, given the position of the two queens on a chess board, you will have to +implement the function `can_attack` in the given struct `Queen` with +the purpose of finding out if the two queens can attack each other or not. + +For this to be possible, you will also have to implement the struct `ChessPosition` +with the function `new` that will allow you to verify if the position is valid or not. If the position is valid it will return that position and if it is invalid it will return `None`. + +So if you are told that the white queen is at (2, 3) and the black queen is at (5, 6), +then you would know you have got a set-up like so: + +``` +_ _ _ _ _ _ _ _ +_ _ _ _ _ _ _ _ +_ _ _ W _ _ _ _ +_ _ _ _ _ _ _ _ +_ _ _ _ _ _ _ _ +_ _ _ _ _ _ B _ +_ _ _ _ _ _ _ _ +_ _ _ _ _ _ _ _ +``` + +In this case, the two queens can attack each other because both pieces share a diagonal. + +### Expected Function + +```rust +#[derive(Debug)] +pub struct ChessPosition { + rank: i32, + file: i32, +} + +#[derive(Debug)] +pub struct Queen { + position: ChessPosition, +} + +impl ChessPosition { + pub fn new(rank: i32, file: i32) -> Option {} +} + +impl Queen { + pub fn can_attack(&self, other: &Queen) -> bool {} +} +``` + +### Usage + +Here is a possible program to test your function : + +```rust +use queens::queens; + +fn main() { + let white_queen = Queen::new(ChessPosition::new(2, 2).unwrap()); + let black_queen = Queen::new(ChessPosition::new(0, 4).unwrap()); + + println!( + "Is it possible for the queens to attack each other? => {}", + white_queen.can_attack(&black_queen) + ); + + let white_queen = Queen::new(ChessPosition::new(1, 2).unwrap()); + let black_queen = Queen::new(ChessPosition::new(0, 4).unwrap()); + + println!( + "Is it possible for the queens to attack each other? => {}", + white_queen.can_attack(&black_queen) + ); +} +``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +Is it possible for the queens to attack each other? => true +Is it possible for the queens to attack each other? => false +student@ubuntu:~/[[ROOT]]/test$ +``` diff --git a/subjects/rot21/README.md b/subjects/rot21/README.md new file mode 100644 index 000000000..cef47cee2 --- /dev/null +++ b/subjects/rot21/README.md @@ -0,0 +1,44 @@ +## rot21 + +### Instructions + +Your purpose in this exercise is to create a `rot21` function that works like the ROT13 cipher. + +Your function will receive a string and it will rotate each letter of that string 21 times to the right. + +Your function should only change letters. If the string includes punctuation, symbols and numbers +they will remain the same. + +### Expected functions + +```rust +pub fn rot21(input: &str) -> String {} +``` + +### Usage + +Here is a program to test your function. + +```rust +use rot21::rot21; + +fn main() { + println!("The letter \"a\" becomes: {}", rot21("a")); + println!("The letter \"m\" becomes: {}", rot21("m")); + println!("The word \"MISS\" becomes: {}", rot21("MISS")); + println!("Your cypher wil be: {}", rot21("Testing numbers 1 2 3")); + println!("Your cypher wil be: {}", rot21("rot21 works!")); +} + +``` + +And its output + +```console +The letter "a" becomes: v +The letter "m" becomes: h +The word "MISS" becomes: HDNN +Your cypher wil be: Oznodib iphwzmn 1 2 3 +Your cypher wil be: mjo21 rjmfn! +student@ubuntu:~/[[ROOT]]/test$ +``` From fb929c60fa67c270206c827066a74e76841e7bff Mon Sep 17 00:00:00 2001 From: Christopher Fremond <34804391+Frenchris@users.noreply.github.com> Date: Tue, 26 Jan 2021 18:02:09 +0000 Subject: [PATCH 11/42] Update README.md --- subjects/hellorust/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/hellorust/README.md b/subjects/hellorust/README.md index 763401af6..33950b0f1 100644 --- a/subjects/hellorust/README.md +++ b/subjects/hellorust/README.md @@ -1,4 +1,4 @@ -## hellorust +## hello_rust ### Introduction From 26bc6429c027017b57ac35cf88df54ea7a43a096 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 26 Jan 2021 18:07:12 +0000 Subject: [PATCH 12/42] renaming of subject --- subjects/hello_rust/README.md | 99 +++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 subjects/hello_rust/README.md diff --git a/subjects/hello_rust/README.md b/subjects/hello_rust/README.md new file mode 100644 index 000000000..33950b0f1 --- /dev/null +++ b/subjects/hello_rust/README.md @@ -0,0 +1,99 @@ +## hello_rust + +### Introduction + +Hello and welcome to rust. +The goal of this first exercise is to configure your repository properly and to give you a set of rules for the whole piscine rust. +Make sure those rules are followed consistenly during the whole piscine. + +### Instructions + +#### 1- get-ready + +Create in your [Gitea](https://git.[[DOMAIN]]) account the repository named `[[ROOT]]`. + +This repository will be the folder where all the exercices must be uploaded. + +Once created, clone that repository on your desktop. + +If your username was `choumi` this is the command that will need to be used : + +`git clone git@git.[[DOMAIN]]:choumi/[[ROOT]].git` + +This command needs to be adapted with **your own username**. + +If the `git clone` gives you an authenticity of host error, your SSH key must be configured. +Follow the steps below. + +#### SSH Configuration + +Execute the following commands: + +```console +mkdir -p ~/.ssh +ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' +cat ~/.ssh/id_ed25519.pub +``` + +- Copy the result and paste it in the content field of adding an ssh key in your settings (adapt the link with your username). + +[https://git.[[DOMAIN]]/choumi/settings/keys](https://git.[[DOMAIN]]/choumi/settings/keys) + +- Confirm by clicking on the add key button. + +Once this is done the git clone command should work now. + +#### gitignore file + +Once you repository is cloned, +create and edit the .gitignore file in your repository and add this line: +```console +**/target/* +``` +The goal of this setup is to avoid any binary files to be pushed in your gitea accidentaly. + + +#### 2- get-ready + +Below are the commands that you must use during this piscine for initiating programs and functions. This command that you are going to depend in what is asked in the subject. + +#### Commands for a program + +```console +cargo new --vcs=none name-of-exercise +``` + +#### Commands for a function + +```console +cargo --vcs=none new --lib name-of-exercise +``` + +#### 3- try it yourself + +Execute the below command inside your repository + +```console +cargo new --vcs=none hello_rust +``` + +Then adapt the `main.rs` so that it would display `Hello, Rust!` + +You can test it with the below command inside the folder of your exercise. + +```console +cargo run +``` +This command will compile, and run the binary. + +#### 4- return your solution + +After that the `hello_rust` project is executing correctly, it needs to be uploaded to the repository with the following commands : + +1. `git add hello_rust/` +2. `git commit -m "My very first rust commit"` +3. `git push` + +Once these steps are applied, the project can now be submitted for grading on the platform by clicking on the "RUN HELLO_RUST..." button. + +This action will run the tests on your submitted `hello_rust` folder. From ec36485648cd0275cde7cb0abeb7530c8c38eda7 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 26 Jan 2021 18:39:16 +0000 Subject: [PATCH 13/42] Fix a typo in the roman_numbers exercise --- subjects/roman_numbers/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/roman_numbers/README.md b/subjects/roman_numbers/README.md index c4c8ea5cd..2b6ff317d 100644 --- a/subjects/roman_numbers/README.md +++ b/subjects/roman_numbers/README.md @@ -1,7 +1,7 @@ ## roman_numbers ### Instructions -Implement the From Trait to create a roman number from a u32 the roman number should be in subtractive notation (the common way to write roman number I, II, II, IV, V, VI, VII, VIII, IX, X ...) +Implement the From Trait to create a roman number from a u32 the roman number should be in subtractive notation (the common way to write roman number I, II, III, IV, V, VI, VII, VIII, IX, X ...) For this start by defining the digits as `RomanDigit` with the values I, V, X, L, C, D, M and Nulla for 0 From df14481572e292c5b8df62df2a83e0da1744ab39 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 26 Jan 2021 18:40:34 +0000 Subject: [PATCH 14/42] Add the subject for the exercise display_table --- subjects/display_table/README.md | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 subjects/display_table/README.md diff --git a/subjects/display_table/README.md b/subjects/display_table/README.md new file mode 100644 index 000000000..a54536992 --- /dev/null +++ b/subjects/display_table/README.md @@ -0,0 +1,79 @@ +## display_table + +### Instructions + +- Implement the std::fmt::Display trait for the structure table so the table is printed like in the [Usage](#usage) the length of each column must adjust to the longest element of the column and the element must be centered in the "cell" when possible, if the length of the element doesn't allow to center exactly it must alight slightly to the right. + + - Note: If the table is empty `println!` must not print anything. + +- Define the associated function `new` that create a new empty table. + +- Define the method function `add_row` that adds a new row to the table created from a slice of strings. + +### Expected function + +```rust +pub struct Table { + pub headers: Vec, + pub body: Vec>, +} + +impl fmt::Display for Table { +} + +impl Table { + fn new() -> Table { + } + + fn add_row(&mut self, row: &[String]) { + } +} +``` + +### Usage + +Here is a possible test for your function: + +```rust +fn main() { + let mut table = Table::new(); + println!("{}", table); + table.headers = vec![ + String::from("Model"), + String::from("Piece N°"), + String::from("In Stock"), + String::from("Description"), + ]; + table.add_row(&[ + String::from("model 1"), + String::from("43-EWQE304"), + String::from("30"), + String::from("Piece for x"), + ]); + table.add_row(&[ + String::from("model 2"), + String::from("98-QCVX5433"), + String::from("100000000"), + String::from("-"), + ]); + table.add_row(&[ + String::from("model y"), + String::from("78-NMNH"), + String::from("60"), + String::from("nothing"), + ]); + println!("{}", table); +} +``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +| Model | Piece N° | In Stock | Description | +|---------+-------------+-----------+-------------| +| model 1 | 43-EWQE304 | 30 | Piece for x | +| model 2 | 98-QCVX5433 | 100000000 | - | +| model y | 78-NMNH | 60 | nothing | +student@ubuntu:~/[[ROOT]]/test$ +``` From eec65f28a9671940fa78e876854d7ae35bdff580 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 26 Jan 2021 22:11:16 +0000 Subject: [PATCH 15/42] Add the subject for the exercise `display_table` --- subjects/display_table/README.md | 4 +- subjects/filter_table/README.md | 85 ++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 subjects/filter_table/README.md diff --git a/subjects/display_table/README.md b/subjects/display_table/README.md index a54536992..31419c7fc 100644 --- a/subjects/display_table/README.md +++ b/subjects/display_table/README.md @@ -22,10 +22,10 @@ impl fmt::Display for Table { } impl Table { - fn new() -> Table { + pub fn new() -> Table { } - fn add_row(&mut self, row: &[String]) { + pub fn add_row(&mut self, row: &[String]) { } } ``` diff --git a/subjects/filter_table/README.md b/subjects/filter_table/README.md new file mode 100644 index 000000000..f33ce790a --- /dev/null +++ b/subjects/filter_table/README.md @@ -0,0 +1,85 @@ +## filter_table + +### Instructions + +- Define the functions: + + - new: creates a new empty table. + + - add_rows: adds a new row to the table from a slice of strings. + + - filter_cols: that receives a closure that receives a `&str` and returns a `bool` value: + + - filter_cols returns a table with all the columns that yielded true when applied to the header. + + - filter_rows: that receives a closure that receives a `&str` and returns a `bool` value + + - filter_rows returns a table with all the columns that yielded true when applied to the elements of the selected column. + +### Expected function + +```rust +pub struct Table { + pub headers: Vec, + pub body: Vec>, +} + +impl Table { + pub fn new() -> Table { + } + + pub fn add_row(&mut self, row: &[String]) { + } + + pub fn filter_col(&self, filter: ) -> Option { + + } + + pub fn filter_row(&self, col_name: &str, filter: ) -> Option { + } +} +``` + +### Usage + +Here is a possible test for your function: + +```rust +fn main() { + let mut table = Table::new(); + table.headers = vec![ + "Name".to_string(), + "Last Name".to_string(), + "ID Number".to_string(), + ]; + table.add_row(&[ + "Adam".to_string(), + "Philips".to_string(), + "123456789".to_string(), + ]); + table.add_row(&[ + "Adamaris".to_string(), + "Shelby".to_string(), + "1111123456789".to_string(), + ]); + table.add_row(&[ + "Ackerley".to_string(), + "Philips".to_string(), + "123456789".to_string(), + ]); + let filter_names = |col: &str| col == "Name"; + println!("{:?}", table.filter_col(filter_names)); + + let filter_philips = |lastname: &str| lastname == "Philips"; + println!("{:?}", table.filter_row("Last Name", filter_philips)); +} +``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +Some(Table { headers: ["Name"], body: [["Adam"], ["Adamaris"], ["Ackerley"]] }) +Some(Table { headers: ["Name", "Last Name", "ID Number"], body: [["Adam", "Philips", "123456789"], ["Ackerley", "Philips", "123456789"]] }) +student@ubuntu:~/[[ROOT]]/test$ +``` From 7397c5c7b49d6fbab46f40e10236c6b8ed889b31 Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 27 Jan 2021 10:20:27 +0000 Subject: [PATCH 16/42] Add the subject for the exercise `flat_tree` --- subjects/flat_tree/README.md | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 subjects/flat_tree/README.md diff --git a/subjects/flat_tree/README.md b/subjects/flat_tree/README.md new file mode 100644 index 000000000..3ecda4c61 --- /dev/null +++ b/subjects/flat_tree/README.md @@ -0,0 +1,43 @@ +## flat_rust + +### Instructions + +- Define the functions `flatten_tree` that receives a std::collections::BTreeSet and returns a new `Vec` with the elements in the binary tree in order. + +### Expected function + +```rust +pub fn flatten_tree>(tree: &BTreeSet) -> Vec { +} +``` + +### Usage + +Here is a possible test for your function: + +```rust +fn main() { + let mut tree = BTreeSet::new(); + tree.insert(34); + tree.insert(0); + tree.insert(9); + tree.insert(30); + println!("{:?}", flatten_tree(&tree)); + + let mut tree = BTreeSet::new(); + tree.insert("Slow"); + tree.insert("kill"); + tree.insert("will"); + tree.insert("Horses"); + println!("{:?}", flatten_tree(&tree)); +} +``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +[0, 9, 30, 34] +["Horses", "Slow", "kill", "will"] +student@ubuntu:~/[[ROOT]]/test$ +``` From 6d4ca52b21b9001c68f4ad33bcc89e550dca63cf Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 27 Jan 2021 12:17:25 +0000 Subject: [PATCH 17/42] Add the subject for the exercise `blood_types_s` A simplified version of `blood_types` --- subjects/blood_types_s/README.md | 92 ++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 subjects/blood_types_s/README.md diff --git a/subjects/blood_types_s/README.md b/subjects/blood_types_s/README.md new file mode 100644 index 000000000..9fe000719 --- /dev/null +++ b/subjects/blood_types_s/README.md @@ -0,0 +1,92 @@ +## blood_types_s + +### Instructions + +Use the following table to define the methods asked: + +| Blood Types | Donate Blood to | Receive Blood From | +|-------------|------------------|--------------------| +| A+ | A+, AB+ | A+, A-, O+, O- | +| O+ | O+, A+, B+, AB+ | O+, O- | +| B+ | O+, O- | B+, B-, O+, O- | +| AB+ | AB+ | Everyone | +| A- | A+, A-, AB+, AB- | A-, O- | +| O- | Everyone | O- | +| B- | B+, B-, AB+, AB- | B-, O- | +| AB- | AB+, AB- | AB-, A-, B-, O- | + +Write three methods for BloodType: + +- `can_receive_from`: which returns true if `self` can receive blood from `other` blood type +- `donors`: which returns all the blood types that can give blood to `self` +- `recipients`: which returns all the blood types that can receive blood from `self` + +### Expected Functions and Structures + +```rust +#[derive(Debug, PartialEq, Eq, Clone, PartialOrd, Ord)] +pub enum Antigen { + A, + AB, + B, + O, +} + +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)] +enum RhFactor { + Positive, + Negative, +} + +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone)] +pub struct BloodType { + pub antigen: Antigen, + pub rh_factor: RhFactor, +} + +impl BloodType { + pub fn can_receive_from(&self, other: &Self) -> bool { + } + + pub fn donors(&self) -> Vec { + } + + pub fn recipients(&self) -> Vec { +} +``` + +### Usage + +Here is a program to test your function. + +```rust +use blood_types_s::{Antigen, BloodType, RhFactor}; + +fn main() { + let blood_type = BloodType { + antigen: Antigen::O, + rh_factor: RhFactor::Positive, + }; + println!("recipients of O+ {:?}", blood_type.recipients()); + println!("donors of O+ {:?}", blood_type.donors()); + let another_blood_type = BloodType { + antigen: Antigen::O, + rh_factor: RhFactor::Positive, + }; + println!( + "donors of O+ can receive from {:?} {:?}", + &another_blood_type, + blood_type.can_receive_from(&another_blood_type) + ); +} +``` + +And its output + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +recipients of O+ [BloodType { antigen: AB, rh_factor: Positive }, BloodType { antigen: O, rh_factor: Positive }, BloodType { antigen: A, rh_factor: Positive }, BloodType { antigen: B, rh_factor: Positive }] +donors of O+ [BloodType { antigen: O, rh_factor: Positive }, BloodType { antigen: O, rh_factor: Negative }] +donors of O+ can receive from BloodType { antigen: O, rh_factor: Positive } true +student@ubuntu:~/[[ROOT]]/test$ +``` From 65ba9208fcd311a0ac08f522f84fca0d55b6e6f5 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Wed, 27 Jan 2021 14:46:34 +0000 Subject: [PATCH 18/42] new subjects for rust exams --- subjects/brain_fuck/README.md | 42 ++++++++++++++++++ subjects/nextprime/README.md | 37 ++++++++++++++++ subjects/previousprime/README.md | 33 +++++++++++++++ subjects/rpn/README.md | 73 ++++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 subjects/brain_fuck/README.md create mode 100644 subjects/nextprime/README.md create mode 100644 subjects/previousprime/README.md create mode 100644 subjects/rpn/README.md diff --git a/subjects/brain_fuck/README.md b/subjects/brain_fuck/README.md new file mode 100644 index 000000000..b6832d5c2 --- /dev/null +++ b/subjects/brain_fuck/README.md @@ -0,0 +1,42 @@ +## brain_fuck + +### Instructions + +Write a `Brainfuck` interpreter program. +The source code will be given as first parameter. +The code will always be valid, with less than 4096 operations. +`Brainfuck` is a minimalist language. It consists of an array of bytes (in this exercice 2048 bytes) all initialized with zero, and with a pointer to its first byte. + +Every operator consists of a single character : + +- '>' increment the pointer +- '<' decrement the pointer +- '+' increment the pointed byte +- '-' decrement the pointed byte +- '.' print the pointed byte on standard output +- '[' go to the matching ']' if the pointed byte is 0 (loop start) +- ']' go to the matching '[' if the pointed byte is not 0 (loop end) + +Any other character is a comment. + +For receiving arguments from the command line you should use something like: + +```rust + fn main() { + let args: Vec = std::env::args().collect(); + + rpn(&args[1]); + } + +``` + +### Usage + +```console +$ cargo run "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." +Hello World! +$ cargo run "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." +Hi +$ cargo run "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." +abc +``` diff --git a/subjects/nextprime/README.md b/subjects/nextprime/README.md new file mode 100644 index 000000000..5c1ef2fc7 --- /dev/null +++ b/subjects/nextprime/README.md @@ -0,0 +1,37 @@ +## nextprime + +### Instructions + +Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter. + +The function must be optimized in order to avoid time-outs with the tester. + +(We consider that only positive numbers can be prime numbers) + +### Expected function + +```rust +pub fn next_prime(nbr: u64) -> u64 { + +} +``` + +### Usage + +Here is a possible program to test your function : + +```rust +fn main() { + println!("The next prime after 4 is: {}", next_prime(4)); + println!("The next prime after 11 is: {}", next_prime(11)); +} +``` + +And its output : + +```console +$ cargo run +The next prime after 4 is: 5 +The next prime after 11 is: 11 +$ +``` diff --git a/subjects/previousprime/README.md b/subjects/previousprime/README.md new file mode 100644 index 000000000..44ddbd0d0 --- /dev/null +++ b/subjects/previousprime/README.md @@ -0,0 +1,33 @@ +## prev_prime + +### Instructions + +Write a function that returns the first prime number that is equal or inferior to the `int` passed as parameter. + +If there are no primes inferior to the `int` passed as parameter the function should return 0. + +### Expected function + +```rust +pub fn prev_prime(nbr: u64) -> u64 { + +} +``` + +### Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```rust +fn main() { + println!("The previous prime number before 34 is: {}", prev_prime(34)); +} +``` + +And its output : + +```console +$ cargo run +The previous prime number before 34 is: 31 +$ +``` diff --git a/subjects/rpn/README.md b/subjects/rpn/README.md new file mode 100644 index 000000000..122f90f5d --- /dev/null +++ b/subjects/rpn/README.md @@ -0,0 +1,73 @@ +## rpn + +### Instructions + +Write a program that takes a `string` which contains an equation written in +`Reverse Polish Notation` (RPN) as its first argument, that evaluates the equation, and that +prints the result on the standard output followed by a newline (`'\n'`). + +`Reverse Polish Notation` is a mathematical notation in which every operator +follows all of its operands. In RPN, every operator encountered evaluates the +previous 2 operands, and the result of this operation then becomes the first of +the two operands for the subsequent operator. Operands and operators must be +spaced by at least one space. + +The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. + +If the `string` is not valid or if there is not exactly one argument, `Error` must be printed +on the standard output followed by a newline. +If the `string` has extra spaces it is still considered valid. + +All the given operands must fit in a `int`. + +Examples of formulas converted in RPN: + +3 + 4 >> 3 4 + + +((1 \* 2) \* 3) - 4 >> 1 2 \* 3 \* 4 - or 3 1 2 \* \* 4 - + +50 \* (5 - (10 / 9)) >> 5 10 9 / - 50 \* + +Here is how to evaluate a formula in RPN: + +``` +1 2 * 3 * 4 - +2 3 * 4 - +6 4 - +2 +``` + +Or: + +``` +3 1 2 * * 4 - +3 2 * 4 - +6 4 - +2 +``` + +For receiving arguments from the command line you should use something like: + +```rust + fn main() { + let args: Vec = std::env::args().collect(); + + rpn(&args[1]); + } + +``` + +### Usage + +````console +$ cargo run "1 2 * 3 * 4 +" +10 +$ cargo run "1 2 3 4 +" +Error +$ cargo run +Error +$ cargo run " 1 3 * 2 -" +1 +$ cargo run " 1 3 * ksd 2 -" +Error``` +```` From 6f057baf12ebdcd0ee16d282874ccdb03258eb51 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Wed, 27 Jan 2021 14:53:44 +0000 Subject: [PATCH 19/42] brain_fuck fix --- subjects/brain_fuck/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/brain_fuck/README.md b/subjects/brain_fuck/README.md index b6832d5c2..abcf729d5 100644 --- a/subjects/brain_fuck/README.md +++ b/subjects/brain_fuck/README.md @@ -25,7 +25,7 @@ For receiving arguments from the command line you should use something like: fn main() { let args: Vec = std::env::args().collect(); - rpn(&args[1]); + brain_fuck(&args[1]); } ``` From a59ab0eed95a593e2002f68f72a46fa877f9a83c Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 27 Jan 2021 15:52:41 +0000 Subject: [PATCH 20/42] typo fix --- subjects/hello_rust/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/hello_rust/README.md b/subjects/hello_rust/README.md index 33950b0f1..0747855c6 100644 --- a/subjects/hello_rust/README.md +++ b/subjects/hello_rust/README.md @@ -66,7 +66,7 @@ cargo new --vcs=none name-of-exercise #### Commands for a function ```console -cargo --vcs=none new --lib name-of-exercise +cargo new --vcs=none --lib name-of-exercise ``` #### 3- try it yourself From 9b2ea16be389853655499c98907c93d9018d4930 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 27 Jan 2021 15:53:41 +0000 Subject: [PATCH 21/42] cleanup of wrong folder --- subjects/hellorust/README.md | 99 ------------------------------------ 1 file changed, 99 deletions(-) delete mode 100644 subjects/hellorust/README.md diff --git a/subjects/hellorust/README.md b/subjects/hellorust/README.md deleted file mode 100644 index 33950b0f1..000000000 --- a/subjects/hellorust/README.md +++ /dev/null @@ -1,99 +0,0 @@ -## hello_rust - -### Introduction - -Hello and welcome to rust. -The goal of this first exercise is to configure your repository properly and to give you a set of rules for the whole piscine rust. -Make sure those rules are followed consistenly during the whole piscine. - -### Instructions - -#### 1- get-ready - -Create in your [Gitea](https://git.[[DOMAIN]]) account the repository named `[[ROOT]]`. - -This repository will be the folder where all the exercices must be uploaded. - -Once created, clone that repository on your desktop. - -If your username was `choumi` this is the command that will need to be used : - -`git clone git@git.[[DOMAIN]]:choumi/[[ROOT]].git` - -This command needs to be adapted with **your own username**. - -If the `git clone` gives you an authenticity of host error, your SSH key must be configured. -Follow the steps below. - -#### SSH Configuration - -Execute the following commands: - -```console -mkdir -p ~/.ssh -ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' -cat ~/.ssh/id_ed25519.pub -``` - -- Copy the result and paste it in the content field of adding an ssh key in your settings (adapt the link with your username). - -[https://git.[[DOMAIN]]/choumi/settings/keys](https://git.[[DOMAIN]]/choumi/settings/keys) - -- Confirm by clicking on the add key button. - -Once this is done the git clone command should work now. - -#### gitignore file - -Once you repository is cloned, -create and edit the .gitignore file in your repository and add this line: -```console -**/target/* -``` -The goal of this setup is to avoid any binary files to be pushed in your gitea accidentaly. - - -#### 2- get-ready - -Below are the commands that you must use during this piscine for initiating programs and functions. This command that you are going to depend in what is asked in the subject. - -#### Commands for a program - -```console -cargo new --vcs=none name-of-exercise -``` - -#### Commands for a function - -```console -cargo --vcs=none new --lib name-of-exercise -``` - -#### 3- try it yourself - -Execute the below command inside your repository - -```console -cargo new --vcs=none hello_rust -``` - -Then adapt the `main.rs` so that it would display `Hello, Rust!` - -You can test it with the below command inside the folder of your exercise. - -```console -cargo run -``` -This command will compile, and run the binary. - -#### 4- return your solution - -After that the `hello_rust` project is executing correctly, it needs to be uploaded to the repository with the following commands : - -1. `git add hello_rust/` -2. `git commit -m "My very first rust commit"` -3. `git push` - -Once these steps are applied, the project can now be submitted for grading on the platform by clicking on the "RUN HELLO_RUST..." button. - -This action will run the tests on your submitted `hello_rust` folder. From a8ecdb0587be979e2a826f1255dab5a297b32b47 Mon Sep 17 00:00:00 2001 From: augusto-mantilla Date: Thu, 28 Jan 2021 15:55:12 +0000 Subject: [PATCH 22/42] Add missing line in the subject --- subjects/rot21/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/subjects/rot21/README.md b/subjects/rot21/README.md index cef47cee2..aa20978f7 100644 --- a/subjects/rot21/README.md +++ b/subjects/rot21/README.md @@ -35,6 +35,7 @@ fn main() { And its output ```console +student@ubuntu:~/[[ROOT]]/test$ cargo run The letter "a" becomes: v The letter "m" becomes: h The word "MISS" becomes: HDNN From 797c1a4c05c62a0ead5ce7df7301d428cc791cb7 Mon Sep 17 00:00:00 2001 From: Augusto Date: Thu, 28 Jan 2021 20:47:58 +0000 Subject: [PATCH 23/42] Fix typos in the subject of the exercise blood_types --- subjects/blood_types/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/subjects/blood_types/README.md b/subjects/blood_types/README.md index 5aba94f13..061abb96b 100644 --- a/subjects/blood_types/README.md +++ b/subjects/blood_types/README.md @@ -2,12 +2,12 @@ ### Instructions -In this exercise you will create a model data model of blood types and an API to deal with blood types +In this exercise you will create a data model of blood types and an API to deal with blood types -Start by creating the data representation of the blood types: +Start by copying the data representation of the blood types: - Create the enumerator `Antigen` that has 4 possibilities: A, B, O and AB And the enumerator `RhFactor` that has two possible values: Positive and Negative -- After, create the struct BloodType that contains two fields with the names antigen and rh_factor +- After, copy the struct BloodType that contains two fields with the names antigen and rh_factor - To provide a simple way to create blood types implement the trait FromStr for BloodType (which will allow us to use the `parse` method and the associated function from_str, so we can do: @@ -19,11 +19,11 @@ Start by creating the data representation of the blood types: - Implement the trait std::Debug for BloodType allowing to print a vector such as [BloodType { antigen: A, rh_factor: Positive}, BloodType{ antigen: B, rh_factor: Negative}] as [ A+, A-] using the formatting {:?} -Write three methods for BloodType: +- Lastly, write three methods for BloodType: -- `can_receive_from`: which returns true if self can receive blood from `other` blood type -- `donors`: which returns all the blood types that can give blood to self -- `recipients`: which returns all the blood types that can receive blood from self + - `can_receive_from`: which returns true if `self` can receive blood from `other` blood type + - `donors`: which returns all the blood types that can give blood to `self` + - `recipients`: which returns all the blood types that can receive blood from `self` ### Expected Functions and Structures From f231674fc9be8efdce8140aa2ea97a0b64ebfe2f Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Mon, 1 Feb 2021 14:55:58 +0100 Subject: [PATCH 24/42] Update docker-compose version --- sh/debian/configure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/debian/configure.sh b/sh/debian/configure.sh index cbb27f8cf..102892d7b 100755 --- a/sh/debian/configure.sh +++ b/sh/debian/configure.sh @@ -126,9 +126,9 @@ apt-get update apt-get -y install docker-ce docker-ce-cli containerd.io # Docker compose -curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose -curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose +curl -L https://raw.githubusercontent.com/docker/compose/1.28.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose # Generate SSH key ssh-keygen -ted25519 -f ~/.ssh/id_ed25519 -N '' From 55ecdeb58a1d69b7ac48de2eee14ba90317fe98f Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Mon, 1 Feb 2021 15:28:26 +0100 Subject: [PATCH 25/42] use Cloudflare DNS server --- sh/debian/configure.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sh/debian/configure.sh b/sh/debian/configure.sh index 102892d7b..2efabe5a1 100755 --- a/sh/debian/configure.sh +++ b/sh/debian/configure.sh @@ -133,6 +133,9 @@ curl -L https://raw.githubusercontent.com/docker/compose/1.28.2/contrib/completi # Generate SSH key ssh-keygen -ted25519 -f ~/.ssh/id_ed25519 -N '' +# Use Cloudflare DNS server +echo 'supersede domain-name-servers 1.1.1.1;' >> /etc/dhcp/dhclient.conf + # Cleanup sed -i '/^deb-src/d' /etc/apt/sources.list apt-get update From bd3d3d80a18752445d006208a9953b94a040cc16 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 1 Feb 2021 18:08:30 +0000 Subject: [PATCH 26/42] precisions added --- subjects/hello_rust/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/subjects/hello_rust/README.md b/subjects/hello_rust/README.md index 0747855c6..5201edaae 100644 --- a/subjects/hello_rust/README.md +++ b/subjects/hello_rust/README.md @@ -52,6 +52,11 @@ create and edit the .gitignore file in your repository and add this line: ``` The goal of this setup is to avoid any binary files to be pushed in your gitea accidentaly. +Do not forget to push it to your repository. + +1. `git add .gitignore` +2. `git commit -m "My very first gitignore commit"` +3. `git push` #### 2- get-ready @@ -71,7 +76,7 @@ cargo new --vcs=none --lib name-of-exercise #### 3- try it yourself -Execute the below command inside your repository +Execute the below command for creating a **program** inside your repository ```console cargo new --vcs=none hello_rust From 7f9e8fa957d7a127f9c07dfdab736377324c416b Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Feb 2021 13:20:52 +0000 Subject: [PATCH 27/42] details added --- subjects/fibonacci2/README.md | 16 +++++++++++---- subjects/scalar/README.md | 37 ++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/subjects/fibonacci2/README.md b/subjects/fibonacci2/README.md index 7cd2af063..681e46338 100644 --- a/subjects/fibonacci2/README.md +++ b/subjects/fibonacci2/README.md @@ -2,12 +2,21 @@ ### Instructions -Complete the body of the function `fibonacci`. +Complete the body of the **function** `fibonacci`. -This functions receives a number n and returns the nth number in the fibonacci series. +This functions receives a number `n` and returns the nth number in the fibonacci series. -The Fibonacci Series starts like this: 0, 1, 1, 2, 3, 5, 8, 13... so fibonacci(2) = 1 and fibonnacci(4) = 3 +The Fibonacci Series starts like this: 0, 1, 1, 2, 3, 5, 8, 13 etc... +Each number in the series is calculated by the summing of the two previous ones (With the exception of the two first ones which are defined as 0 and 1). +- so fibonacci(2) = 1 (1 + 1) +- and fibonnacci(4) = 3 (1 + 2) +### TNotions + +#### Primitives +- https://doc.rust-lang.org/stable/rust-by-example/primitives.html +#### Functions +- https://doc.rust-lang.org/stable/rust-by-example/fn.html ### Expected function @@ -42,4 +51,3 @@ The element in the position 22 in fibonacci series is 17711 The element in the position 20 in fibonacci series is 6765 student@ubuntu:~/[[ROOT]]/test$ ``` - diff --git a/subjects/scalar/README.md b/subjects/scalar/README.md index c7c20e72b..6f86ed9db 100644 --- a/subjects/scalar/README.md +++ b/subjects/scalar/README.md @@ -1,43 +1,52 @@ -## Scaler +## Scalar ### Instructions -Create the following functions, that receives two parameters: -- sum, that returns the sum between two values from 0 to 255 -- diff, that returns the difference between two values from -32768 to 32767 -- pro, that returns the product of the multiplication between two values from -128 to 127 -- quo, that returns the quotient of the division between two values -- rem, that returns the remainder of the division between two values +Create the following **functions**, which each receives two parameters: +- `sum`, which returns the sum between two values from 0 to 255 +- `diff`, which returns the difference between two values from -32768 to 32767 +- `pro`, which returns the product of the multiplication between two values from -128 to 127 +- `quo`, which returns the quotient of the division between two values (32bit and you have to figure out the second part) +- `rem`, which returns the remainder of the division between two values (32bit and you have to figure out the second part) + +You **must** complete the Expected functions parameters data type accordingly (Replace the Xs)! + ### Notions - https://doc.rust-lang.org/book/ch03-02-data-types.html -### Expected functions +### Expected functions (Incomplete, you must precise the Data Types) ```rust -pub fn sum(a:, b: ) -> { +pub fn sum(a: X , b: X) -> X { } -pub fn diff(a: , b: ) -> { +pub fn diff(a: X, b: X) -> X { } -pub fn pro(a: , b: ) -> { +pub fn pro(a: X, b: X) -> X { } -pub fn quo(a: , b: ) -> { +pub fn quo(a: X, b: X) -> X { } -pub fn rem(a: , b: ) -> { +pub fn rem(a: X, b: X) -> X { } ``` -### Usage: +### Usage (do not forget to comment the ERROR test if you want to use all the tests): ```rust +use scalar::sum; +use scalar::diff; +use scalar::pro; +use scalar::quo; +use scalar::rem; + fn main() { // sum println!("sum : {}", sum(234, 2)); From 10abb32eeefed91d861dee5cf6bec31a578a211b Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 Feb 2021 18:59:38 +0000 Subject: [PATCH 28/42] various clarifications and reformating --- subjects/fibonacci2/README.md | 8 +++----- subjects/find_factorial/README.md | 8 +++++++- subjects/groceries/README.md | 11 ++++++----- subjects/looping/README.md | 6 +++--- subjects/matrix_transposition/README.md | 22 ++++++++++++++++------ subjects/reverse_string/README.md | 11 +++++++++-- subjects/scalar/README.md | 25 +++++++++++-------------- subjects/speed_transformation/README.md | 5 +++-- subjects/temperature_conv/README.md | 21 ++++++++++++++++----- 9 files changed, 74 insertions(+), 43 deletions(-) diff --git a/subjects/fibonacci2/README.md b/subjects/fibonacci2/README.md index 681e46338..2b53c86b7 100644 --- a/subjects/fibonacci2/README.md +++ b/subjects/fibonacci2/README.md @@ -11,12 +11,10 @@ Each number in the series is calculated by the summing of the two previous ones - so fibonacci(2) = 1 (1 + 1) - and fibonnacci(4) = 3 (1 + 2) -### TNotions +### Notions -#### Primitives -- https://doc.rust-lang.org/stable/rust-by-example/primitives.html -#### Functions -- https://doc.rust-lang.org/stable/rust-by-example/fn.html +- [Primitives](https://doc.rust-lang.org/stable/rust-by-example/primitives.html) +- [Functions](https://doc.rust-lang.org/stable/rust-by-example/fn.html) ### Expected function diff --git a/subjects/find_factorial/README.md b/subjects/find_factorial/README.md index dfb88d153..183e78fe6 100644 --- a/subjects/find_factorial/README.md +++ b/subjects/find_factorial/README.md @@ -2,7 +2,13 @@ ### Instruccions -Complete the function `factorial` to return the factorial of a given number +Complete the **function** `factorial` to return the factorial of a given number. + +As a reminder the factorial of a number is the product of all the integers from 1 to that number. + +Example: the factorial of 6 (written 6!) is 1*2*3*4*5*6 = 720. + +Do not forget the rules for 0 and 1. ### Expected Function diff --git a/subjects/groceries/README.md b/subjects/groceries/README.md index eeac4cb2d..28c00fa5a 100644 --- a/subjects/groceries/README.md +++ b/subjects/groceries/README.md @@ -2,13 +2,14 @@ ### Instructions -Create a function called `insert` that inserts a new element at the end of the Vec +Create a **function** called `insert` that inserts a new element at the end of the `Vec`. -And another function `at_index` that returns the value found at the index passed as an argument +And another **function** `at_index` that returns the value found at the index passed as an argument. ### Notions -[Common Collections]( https://doc.rust-lang.org/stable/book/ch08-00-common-collections.html) +- [Common Collections](https://doc.rust-lang.org/stable/book/ch08-00-common-collections.html) +- [Vectors]https://doc.rust-lang.org/stable/book/ch08-01-vectors.html) ### Expected Functions @@ -16,7 +17,7 @@ And another function `at_index` that returns the value found at the index passed pub fn insert(vec: &mut Vec, val: String) { } -pub fn at_index(vec: &Vec, index: ) -> String { +pub fn at_index(vec: &Vec, index: usize) -> String { } ``` @@ -25,7 +26,7 @@ pub fn at_index(vec: &Vec, index: ) -> String { Here is a possible program to test your function: ```rust -use groceries::{insert, at_index} +use groceries::{insert, at_index}; fn main() { let mut groceries = vec![ diff --git a/subjects/looping/README.md b/subjects/looping/README.md index 0be353386..982b05b63 100644 --- a/subjects/looping/README.md +++ b/subjects/looping/README.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that prints a riddle, receives input from the user and checks that the answer is correct +Write a **program** that prints a riddle, receives input from the user and checks that the answer is correct. -The program must allow indefinite number of trials and only quit after the correct answer is given +The program must allow indefinite number of trials and only quit after the correct answer is given. -Every time the user introduces an incorrect answer the program must print the riddle again and after the user gives the correct answer the program must print the number of tries that took to get the correct answer +Every time the user introduces an incorrect answer the program must print the riddle again and after the user gives the correct answer the program must print the number of tries that took to get the correct answer. Riddle: I am the beginning of the end, and the end of time and space. I am essential to creation, and I surround every place. What am I? diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index a1d479fe2..2357a77e8 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -2,9 +2,9 @@ ### Instructions -- Define the structure matrix as a tuple of tuples of `i32`'s +- Define the structure matrix as a tuple of 2 tuples of 2 `i32`'s. -- Define a function that calculate the transpose matrix of a 2x2 matrix. +- Define a function that calculates the transpose matrix of a 2x2 matrix. - Note: @@ -17,13 +17,21 @@ Example: ( c d ) ( b d ) ``` -- Matrix must implement Debug, PartialEq and Eq. You can use derive +- Matrix must implement Debug, PartialEq and Eq. You can use derive. -- Remember that you're defining a library so you have to make public the elements that are going to be called from an external crate. +- Remember that you are defining a library so you have to make public the elements that are going to be called from an external crate. ### Notions -[Chapter 7]( https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html ) +- [Defining a struct](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html) + +- [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) + +- [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types) + +- [Adding Useful Functionality with Derived Traits](https://doc.rust-lang.org/stable/book/ch05-02-example-structs.html?highlight=debug%20deriv#adding-useful-functionality-with-derived-traits) + +- [Chapter 7](https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html) ### Expected Function @@ -37,6 +45,8 @@ pub fn transpose(m: Matrix) -> Matrix { Here is a posible program to test your function ```rust +use matrix_transposition::transpose; + fn main() { let matrix = Matrix((1, 3), (4, 5)); println!("Original matrix {:?}", matrix); @@ -44,7 +54,7 @@ fn main() { } ``` -And it's output: +And its output: ```console student@ubuntu:~/[[ROOT]]/test$ cargo run diff --git a/subjects/reverse_string/README.md b/subjects/reverse_string/README.md index 2dbc251a6..25b8aed4a 100644 --- a/subjects/reverse_string/README.md +++ b/subjects/reverse_string/README.md @@ -2,7 +2,14 @@ ### Instructions -Write a function `rev_str` that takes a `&str` as a parameter, and returns a string with its words reversed. +Write a **function** `rev_str` that takes a `&str` as a parameter, and returns a `String` with its letters reversed. + +### Notions + +- [Strings](https://doc.rust-lang.org/rust-by-example/std/str.html) +- [Primitive Type str](https://doc.rust-lang.org/std/primitive.str.html) +- [Primtive Type char](https://doc.rust-lang.org/std/primitive.char.html) +- [Module std::string](https://doc.rust-lang.org/std/string/index.html) ### Expected Functions @@ -27,7 +34,7 @@ fn main() { } ``` -And it's output: +And its output: ```console student@ubuntu:~/[[ROOT]]/test$ cargo run diff --git a/subjects/scalar/README.md b/subjects/scalar/README.md index 6f86ed9db..8417bd975 100644 --- a/subjects/scalar/README.md +++ b/subjects/scalar/README.md @@ -11,7 +11,7 @@ Create the following **functions**, which each receives two parameters: You **must** complete the Expected functions parameters data type accordingly (Replace the Xs)! ### Notions -- https://doc.rust-lang.org/book/ch03-02-data-types.html +- [Data Types](https://doc.rust-lang.org/book/ch03-02-data-types.html) ### Expected functions (Incomplete, you must precise the Data Types) @@ -38,30 +38,27 @@ pub fn rem(a: X, b: X) -> X { } ``` -### Usage (do not forget to comment the ERROR test if you want to use all the tests): +### Usage : +#### Note that There is no output for this test for you to train to comment accordingly. ```rust -use scalar::sum; -use scalar::diff; -use scalar::pro; -use scalar::quo; -use scalar::rem; +use scalar::*; fn main() { // sum - println!("sum : {}", sum(234, 2)); + println!("sum : {}", sum(234, 2)); // 'sum : 236' println!("sum : {}", sum(1, 255)); // 'ERROR: attempt to add with overflow' // diff - println!("diff : {}", diff(234, 2)); + println!("diff : {}", diff(234, 2)); // 'diff : 232' println!("diff : {}", diff(-32768, 32766)); // 'ERROR: attempt to subtract with overflow' // product - println!("pro : {}", pro(23, 2)); + println!("pro : {}", pro(23, 2)); // 'pro : 46' println!("pro : {}", pro(-128, 2)); // 'ERROR: attempt to multiply with overflow' // quotient - println!("quo : {}", quo(22.0, 2.0)); - println!("quo : {}", quo(-128.23, 2.0)); + println!("quo : {}", quo(22.0, 2.0));// 'quo : 11' + println!("quo : {}", quo(-128.23, 2.0));// 'quo : -64.115' // remainder - println!("rem : {}", rem(22.0, 2.0)); - println!("rem : {}", rem(-128.23, 2.0)); + println!("rem : {}", rem(22.0, 2.0));// 'rem : 0' + println!("rem : {}", rem(-128.23, 2.0));// 'rem : -0.22999573' } ``` diff --git a/subjects/speed_transformation/README.md b/subjects/speed_transformation/README.md index 25573ed0e..16be31cf2 100644 --- a/subjects/speed_transformation/README.md +++ b/subjects/speed_transformation/README.md @@ -2,19 +2,20 @@ ### Instructions -Create a function that receives the speed in km/h (kilometers per hour) and returns the equivalent in m/s (meters per second) +Create a **function** that receives the speed in km/h (kilometers per hour) and returns the equivalent in m/s (meters per second). ### Expected Function ```rust pub fn km_per_hour_to_meters_per_second(km_h: f64) -> f64 { - (10.0 / 36.0) * km_h } ``` ### Usage ```rust +use speed_transformation::km_per_hour_to_meters_per_second; + fn main() { let km_h = 100.0; let m_s = km_per_hour_to_meters_per_second(km_h); diff --git a/subjects/temperature_conv/README.md b/subjects/temperature_conv/README.md index 0c0a86715..223e3fca1 100644 --- a/subjects/temperature_conv/README.md +++ b/subjects/temperature_conv/README.md @@ -2,15 +2,17 @@ ### Instructions -Write two functions to transform values of temperatures from celcius to fahrenheit and the other way arraound: +Write two functions which convert values of temperatures from `fahrenheit` to `celcius` and the other way around. -### Expected funcions +To pass this exercise you must use (9/5) in **both** functions. + +### Expected functions ```rust -fn fahrenheit_to_celsius(f: f64) -> f64 { +pub fn fahrenheit_to_celsius(f: f64) -> f64 { } -fn celsius_to_fahrenheit(c: f64) -> f64 { +pub fn celsius_to_fahrenheit(c: f64) -> f64 { } ``` @@ -19,9 +21,18 @@ fn celsius_to_fahrenheit(c: f64) -> f64 { ```rust use temperature_conv::*; - fn main() { println!("{} F = {} C", -459.67, fahrenheit_to_celsius(-459.67)); println!("{} C = {} F", 0.0, celsius_to_fahrenheit(0.0)); } ``` + +And its output: + +```console +student@ubuntu:~/[[ROOT]]/test$ cargo run +-459.67 F = -273.15 C +0 C = 32 F +student@ubuntu:~/[[ROOT]]/test$ +``` + From 2521ab931d87473657567bc5c55d828e48e9410d Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 Feb 2021 19:06:07 +0000 Subject: [PATCH 29/42] correction in matrix_transposition --- subjects/matrix_transposition/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index 2357a77e8..b538a7d1c 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -46,6 +46,7 @@ Here is a posible program to test your function ```rust use matrix_transposition::transpose; +use matrix_transposition::Matrix; fn main() { let matrix = Matrix((1, 3), (4, 5)); From 4e29a4e19846c82361638e695c7221092580b99a Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 Feb 2021 19:53:35 +0000 Subject: [PATCH 30/42] additional informations --- subjects/division_and_remainder/README.md | 14 +++++++++++--- subjects/matrix_transposition/README.md | 2 ++ subjects/tuples/README.md | 18 ++++++++++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/subjects/division_and_remainder/README.md b/subjects/division_and_remainder/README.md index 71f58c977..525e41717 100644 --- a/subjects/division_and_remainder/README.md +++ b/subjects/division_and_remainder/README.md @@ -2,7 +2,15 @@ ### Instructions -Create a function divide that receives two i32 and returns a tuple in which the first element is the result of the integer division between the two numbers and the second is the remainder of the division. +Create a **function** `divide` that receives two i32 and returns a tuple in which the first element is the result of the integer division between the two numbers and the second is the remainder of the division. + +### Notions + +- [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) + +- [Tuples](https://doc.rust-lang.org/rust-by-example/primitives/tuples.html) + +- [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types) ### Expected Function @@ -14,10 +22,10 @@ pub fn divide(x: i32, y: i32) -> (i32, i32) { ### Usage -Here is a program to test you're function +Here is a program to test your function ```rust -use division_and_remainder::division_and_remainder; +use division_and_remainder::divide; fn main() { let x = 9; diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index b538a7d1c..64863790b 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -27,6 +27,8 @@ Example: - [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) +- [Tuples](https://doc.rust-lang.org/rust-by-example/primitives/tuples.html) + - [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types) - [Adding Useful Functionality with Derived Traits](https://doc.rust-lang.org/stable/book/ch05-02-example-structs.html?highlight=debug%20deriv#adding-useful-functionality-with-derived-traits) diff --git a/subjects/tuples/README.md b/subjects/tuples/README.md index be01cc7ff..2209f6764 100644 --- a/subjects/tuples/README.md +++ b/subjects/tuples/README.md @@ -2,12 +2,26 @@ ### Instructions -- Define a tuple structure to represent a student. +- Define a tuple structure to represent a `Student`. - Each student is identified by an id number of type i32, his/her name and his/her last name as a string Print the content of the tuple to stdout - Then define three functions to return the id, first name and last name. +### Notions + +- [Defining a struct](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html) + +- [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) + +- [Tuples](https://doc.rust-lang.org/rust-by-example/primitives/tuples.html) + +- [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types) + +- [Adding Useful Functionality with Derived Traits](https://doc.rust-lang.org/stable/book/ch05-02-example-structs.html?highlight=debug%20deriv#adding-useful-functionality-with-derived-traits) + +- [Chapter 7](https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html) + ### Expected Functions ```rust @@ -23,7 +37,7 @@ pub fn last_name(student: &Student) -> String { ### Usage -Here is a program to test you're functions +Here is a program to test your functions ```rust use tuples::*; From 7d11821cacb3fc3e33fb0f88eae305a82c43eaa5 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 Feb 2021 20:01:41 +0000 Subject: [PATCH 31/42] bolding function --- subjects/matrix_transposition/README.md | 2 +- subjects/tuples/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index 64863790b..8405c6485 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -4,7 +4,7 @@ - Define the structure matrix as a tuple of 2 tuples of 2 `i32`'s. -- Define a function that calculates the transpose matrix of a 2x2 matrix. +- Define a **function** that calculates the transpose matrix of a 2x2 matrix. - Note: diff --git a/subjects/tuples/README.md b/subjects/tuples/README.md index 2209f6764..7d84a5809 100644 --- a/subjects/tuples/README.md +++ b/subjects/tuples/README.md @@ -6,7 +6,7 @@ - Each student is identified by an id number of type i32, his/her name and his/her last name as a string Print the content of the tuple to stdout -- Then define three functions to return the id, first name and last name. +- Then define three **functions** to return the id, first name and last name. ### Notions From 9bfa6513479601273f12cad3dba59988fa6ec823 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 4 Feb 2021 22:52:51 +0000 Subject: [PATCH 32/42] changes upon review --- subjects/fibonacci2/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/subjects/fibonacci2/README.md b/subjects/fibonacci2/README.md index 2b53c86b7..5b06a3940 100644 --- a/subjects/fibonacci2/README.md +++ b/subjects/fibonacci2/README.md @@ -7,9 +7,6 @@ Complete the body of the **function** `fibonacci`. This functions receives a number `n` and returns the nth number in the fibonacci series. The Fibonacci Series starts like this: 0, 1, 1, 2, 3, 5, 8, 13 etc... -Each number in the series is calculated by the summing of the two previous ones (With the exception of the two first ones which are defined as 0 and 1). -- so fibonacci(2) = 1 (1 + 1) -- and fibonnacci(4) = 3 (1 + 2) ### Notions From e226c81464894a90a487402757cf664ad0c431c2 Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Fri, 5 Feb 2021 17:12:23 +0100 Subject: [PATCH 33/42] Update docker-test-image.md --- docs/docker-test-image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docker-test-image.md b/docs/docker-test-image.md index 993b39a1d..94a31483c 100644 --- a/docs/docker-test-image.md +++ b/docs/docker-test-image.md @@ -26,7 +26,7 @@ The container runs with the following settings (options of `docker run`) : - Working directory inside the container - `--tmpfs /jail:size=100M,noatime,exec,nodev,nosuid,uid=1000,gid=1000,nr_inodes=5k,mode=1700` - Mount a tmpfs directory on `/jail`, 100 MB writable. -- `--volume volume_containing_student_repository:/jail/student:ro` - - Bind mount a volume containing the student repository, read-only. +- `--volume volume_containing_student_repository:/jail/student` + - Bind mount a volume containing the student repository. Example of a [Dockerfile](https://github.com/01-edu/public/blob/master/js/tests/Dockerfile) and its [entrypoint](https://github.com/01-edu/public/blob/master/js/tests/entrypoint.sh). From 743a8af6dcf760d8d974db24730d25093a11efa2 Mon Sep 17 00:00:00 2001 From: lee Date: Tue, 2 Feb 2021 16:29:36 +0000 Subject: [PATCH 34/42] c project --- subjects/atm_management_system/README.md | 126 ++++++++++++++ .../atm_management_system/atm_system/Makefile | 16 ++ .../atm_system/data/records.txt | 6 + .../atm_system/data/users.txt | 2 + .../atm_system/src/auth.c | 59 +++++++ .../atm_system/src/header.h | 37 ++++ .../atm_system/src/main.c | 104 +++++++++++ .../atm_system/src/system.c | 161 ++++++++++++++++++ .../atm_management_system/audit/README.md | 91 ++++++++++ 9 files changed, 602 insertions(+) create mode 100644 subjects/atm_management_system/README.md create mode 100644 subjects/atm_management_system/atm_system/Makefile create mode 100644 subjects/atm_management_system/atm_system/data/records.txt create mode 100644 subjects/atm_management_system/atm_system/data/users.txt create mode 100644 subjects/atm_management_system/atm_system/src/auth.c create mode 100644 subjects/atm_management_system/atm_system/src/header.h create mode 100644 subjects/atm_management_system/atm_system/src/main.c create mode 100644 subjects/atm_management_system/atm_system/src/system.c create mode 100644 subjects/atm_management_system/audit/README.md diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md new file mode 100644 index 000000000..198a0880e --- /dev/null +++ b/subjects/atm_management_system/README.md @@ -0,0 +1,126 @@ +## ATM + +### Objective + +The objective for this projects is to show, that you have learned to program and you are able to adapt to new languages. + +The programming language you are about to use is [C](https://en.wikipedia.org/wiki/C_%28programming_language%29). It will not be asked to create +a project from scratch, but **to add features or fix the code of a given application**. + +### Instructions + +You will be provided with an ATM management system where users can do the following actions: + +- Login/Register +- Create a new account +- Update information of existing account +- Check the details of existing accounts +- Check list of owned account +- Make transaction +- Remove existing account + +The application provided will just handle the **login**, **creation of new accounts** and **check list of owned accounts**. The rest of the features must +be implemented by you. + +### File System + +It will be provided a folder that you can find [here](https://downgit.github.io/#/home?url=https://github.com/01-edu/public/tree/master/subjects/atm-management-system/atm-system/), this folder will have the following fs: + +```console +. +| +├── data +│   ├── records.txt +│   └── users.txt +├── Makefile +├── README.md +└── src +    ├── auth.c +    ├── header.h +    ├── main.c +    └── system.c +``` + +The `data` folder presented above will contain information about the users and their accounts: + +- `users.txt` will be the a file that stores all information about each user +- `records.txt` will be the a file that stores all information relevant to the accounts for each user + +The format for the content saved in the file will be displayed like this : + +`users.txt` (name, password): + +```console +Alice 1234password +Michel password1234 +.... +``` + +`records.txt` (user name, account id, date of creation, country, phone nº, type of account) : + +```console +Alice 0 10/02/2020 german 986134231 11090830.00 current +Michel 2 10/10/2021 portugal 914134431 1920.42 saving +Alice 1 10/10/2000 finland 986134231 1234.21 saving +.... +``` + +### Features + +The following features must be done by you. + +1. **Registration**, you must be able to register new users, it cannot exist users with the same name (names must be unique). They must be saved into the right file + +2. **Update information of existing account**, users must be able to update their country or phone number\ + + 2.1. You must ask users to input the account id they want to change, followed by a prompt asking which field they want to also change (the only fields that are permitted to update is the phone number and the country). + + 2.2. When ever users update an account it must be then saved into the corresponding file. + +3. **Check the details of existing accounts**, users must able to check just one account. + + 3.1. For this it must be asked to input the account id they want to see + + 3.2. If the account is either saving, fixed01, fixed02 and fixed03 the system will display + the information of that account and the interest you will acquire depending on the account: + - saving: rate interest 0.07% + - fixed01(1 year account): rate interest 0.04% + - fixed02(2 year account): rate interest 0.05% + - fixed03(3 year account): rate interest 0.08% + - If the account is current you must display `You will not get interests because the account is of type current` + +4. **Make transaction**, users must be able to create transactions, withdrawing or depositing money to a certain account. All transactions + must be updated and saved into the corresponding file + +5. **Remove existing account**, users must be able to delete their own account, same must happened here, updates must be saved into the corresponding file. + +6. **Transfer owner**, users can transfer their account to another user, by: + + 6.1. Identifying the account and the user they want to transfer the ownership to + + 6.2. Saving the information in the corresponding file + +### Example + +You can find an example of the final application [here](TODO:link_to_youtube_video). Do not forget that you are free to +implement what ever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. + +### Bonus + +You can create bonus features or update the terminal interface: + +- Better terminal interface +- Encryption of passwords +- Adding own Makefile +- Adding more features + +This project will help you learn about: + +- [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) languages + - Language Fundamentals +- Data manipulation + - File [stdino](TODO:link) + - Data structures +- Makefile +- Terminal UI +- Memory management diff --git a/subjects/atm_management_system/atm_system/Makefile b/subjects/atm_management_system/atm_system/Makefile new file mode 100644 index 000000000..62befd2c6 --- /dev/null +++ b/subjects/atm_management_system/atm_system/Makefile @@ -0,0 +1,16 @@ +objects = src/main.o src/system.o src/auth.o + +atm : $(objects) + cc -o atm $(objects) + +main.o : src/header.h +kbd.o : src/header.h +command.o : src/header.h +display.o : src/header.h +insert.o : src/header.h +search.o : src/header.h +files.o : src/header.h +utils.o : src/header.h + +clean : + rm -f $(objects) diff --git a/subjects/atm_management_system/atm_system/data/records.txt b/subjects/atm_management_system/atm_system/data/records.txt new file mode 100644 index 000000000..b9d75f71c --- /dev/null +++ b/subjects/atm_management_system/atm_system/data/records.txt @@ -0,0 +1,6 @@ +Alice 0 10/10/2012 Africa 291321234 22432.52 saving + +Michel 2 2/5/2001 Portugal 123543455 10023.230000 fixed01 + +Michel 123 10/10/2020 UK 1234123 12345.30 saving + diff --git a/subjects/atm_management_system/atm_system/data/users.txt b/subjects/atm_management_system/atm_system/data/users.txt new file mode 100644 index 000000000..00694cf8b --- /dev/null +++ b/subjects/atm_management_system/atm_system/data/users.txt @@ -0,0 +1,2 @@ +Alice q1w2e3r4t5y6 +Michel q1w2e3r4t5y6 diff --git a/subjects/atm_management_system/atm_system/src/auth.c b/subjects/atm_management_system/atm_system/src/auth.c new file mode 100644 index 000000000..c3e61b088 --- /dev/null +++ b/subjects/atm_management_system/atm_system/src/auth.c @@ -0,0 +1,59 @@ +#include +#include "header.h" + +char *USERS = "./data/users.txt"; + +void loginMenu(char a[50], char pass[50]) +{ + struct termios oflags, nflags; + + system("clear"); + printf("\n\n\n\t\t\t\t Bank Management System\n\t\t\t\t\t User Login:"); + scanf("%s", a); + + // disabling echo + tcgetattr(fileno(stdin), &oflags); + nflags = oflags; + nflags.c_lflag &= ~ECHO; + nflags.c_lflag |= ECHONL; + + if (tcsetattr(fileno(stdin), TCSANOW, &nflags) != 0) + { + perror("tcsetattr"); + return exit(1); + } + printf("\n\n\n\n\n\t\t\t\tEnter the password to login:"); + scanf("%s", pass); + + // restore terminal + if (tcsetattr(fileno(stdin), TCSANOW, &oflags) != 0) + { + perror("tcsetattr"); + return exit(1); + } +}; + +const char *getPassword(struct User u) +{ + FILE *fp; + struct User userChecker; + + if ((fp = fopen("./data/users.txt", "r")) == NULL) + { + printf("Error! opening file"); + exit(1); + } + + while (fscanf(fp, "%s %s", userChecker.name, userChecker.password) != EOF) + { + if (strcmp(userChecker.name, u.name) == 0) + { + fclose(fp); + char *buff = userChecker.password; + return buff; + } + } + + fclose(fp); + return "no user found"; +} \ No newline at end of file diff --git a/subjects/atm_management_system/atm_system/src/header.h b/subjects/atm_management_system/atm_system/src/header.h new file mode 100644 index 000000000..61d7971a3 --- /dev/null +++ b/subjects/atm_management_system/atm_system/src/header.h @@ -0,0 +1,37 @@ +#include +#include +#include + +struct Date +{ + int month, day, year; +}; + +// all fields for each record of an account +struct Record +{ + char name[100]; + char country[100]; + int phone; + char accountType[10]; + int accountNbr; + double amount; + struct Date deposit; + struct Date withdraw; +}; + +struct User +{ + char name[50]; + char password[50]; +}; + +// authentication functions +void loginMenu(char a[50], char pass[50]); +void registerMenu(char a[50], char pass[50]); +const char *getPassword(struct User u); + +// system function +void createNewAcc(struct User u); +void mainMenu(struct User u); +void checkAllAccounts(struct User u); diff --git a/subjects/atm_management_system/atm_system/src/main.c b/subjects/atm_management_system/atm_system/src/main.c new file mode 100644 index 000000000..9829a876c --- /dev/null +++ b/subjects/atm_management_system/atm_system/src/main.c @@ -0,0 +1,104 @@ +#include "header.h" + +void mainMenu(struct User u) +{ + int option; + system("clear"); + printf("\n\n\t\t======= ATM =======\n\n"); + printf("\n\t\t-->> Feel free to choose one of the options below <<--\n"); + printf("\n\t\t[1]- Create a new account\n"); + printf("\n\t\t[2]- Update information of account\n"); + printf("\n\t\t[3]- Check accounts\n"); + printf("\n\t\t[4]- Check list of owned account\n"); + printf("\n\t\t[5]- Make Transaction\n"); + printf("\n\t\t[6]- Remove existing account\n"); + printf("\n\t\t[7]- Transfer ownership\n"); + printf("\n\t\t[8]- Exit\n"); + scanf("%d", &option); + + switch (option) + { + case 1: + createNewAcc(u); + break; + case 2: + // student TODO : add your **Update information of existing account** function + // here + break; + case 3: + // student TODO : add your **Check the details of existing accounts** function + // here + break; + case 4: + checkAllAccounts(u); + break; + case 5: + // student TODO : add your **Make transaction** function + // here + break; + case 6: + // student TODO : add your **Remove existing account** function + // here + break; + case 7: + // student TODO : add your **Transfer owner** function + // here + break; + case 8: + exit(1); + break; + default: + printf("Invalid operation!\n"); + } +}; + +void initMenu(struct User *u) +{ + int r = 0; + int option; + system("clear"); + printf("\n\n\t\t======= ATM =======\n"); + printf("\n\t\t-->> Feel free to login / register :\n"); + printf("\n\t\t[1]- login\n"); + printf("\n\t\t[2]- register\n"); + printf("\n\t\t[3]- exit\n"); + while (!r) + { + scanf("%d", &option); + switch (option) + { + case 1: + loginMenu(u->name, u->password); + if (strcmp(u->password, getPassword(*u)) == 0) + { + printf("\n\nPassword Match!"); + } + else + { + printf("\nWrong password!! or User Name\n"); + exit(1); + } + r = 1; + break; + case 2: + // student TODO : add your **Registration** function + // here + r = 1; + break; + case 3: + exit(1); + break; + default: + printf("Insert a valid operation!\n"); + } + } +}; + +int main() +{ + struct User u; + + initMenu(&u); + mainMenu(u); + return 0; +} diff --git a/subjects/atm_management_system/atm_system/src/system.c b/subjects/atm_management_system/atm_system/src/system.c new file mode 100644 index 000000000..1a5f03c92 --- /dev/null +++ b/subjects/atm_management_system/atm_system/src/system.c @@ -0,0 +1,161 @@ +#include "header.h" + +const char *RECORDS = "./data/records.txt"; + +int getAccountFromFile(FILE *ptr, char name[50], struct Record *r) +{ + return fscanf(ptr, "%s %d %d/%d/%d %s %d %lf %s", + name, + &r->accountNbr, + &r->deposit.month, + &r->deposit.day, + &r->deposit.year, + r->country, + &r->phone, + &r->amount, + r->accountType) != EOF; +} + +void saveAccountToFile(FILE *ptr, char name[50], struct Record r) +{ + fprintf(ptr, "%s %d %d/%d/%d %s %d %.2lf %s\n\n", + name, + r.accountNbr, + r.deposit.month, + r.deposit.day, + r.deposit.year, + r.country, + r.phone, + r.amount, + r.accountType); +} + +void stayOrReturn(int notGood, void f(struct User u), struct User u) +{ + int option; + if (notGood == 0) + { + system("clear"); + printf("\n✖ Record not found!!\n"); + invalid: + printf("\nEnter 0 to try again, 1 to return to main menu and 2 to exit:"); + scanf("%d", &option); + if (option == 0) + f(u); + else if (option == 1) + mainMenu(u); + else if (option == 2) + exit(0); + else + { + printf("Insert a valid operation!\n"); + goto invalid; + } + } + else + { + printf("\nEnter 1 to go to the main menu and 0 to exit:"); + scanf("%d", &option); + } + if (option == 1) + { + system("clear"); + mainMenu(u); + } + else + { + system("clear"); + exit(1); + } +} + +void success(struct User u) +{ + int option; + printf("\n✔ Success!\n\n"); +invalid: + printf("Enter 1 to go to the main menu and 0 to exit!\n"); + scanf("%d", &option); + system("clear"); + if (option == 1) + { + mainMenu(u); + } + else if (option == 0) + { + exit(1); + } + else + { + printf("Insert a valid operation!\n"); + goto invalid; + } +} + +void createNewAcc(struct User u) +{ + struct Record r; + struct Record cr; + char userName[50]; + FILE *pf = fopen(RECORDS, "a+"); + +noAccount: + system("clear"); + printf("\t\t\t===== New record =====\n"); + + printf("\nEnter today's date(mm/dd/yyyy):"); + scanf("%d/%d/%d", &r.deposit.month, &r.deposit.day, &r.deposit.year); + printf("\nEnter the account number:"); + scanf("%d", &r.accountNbr); + + while (getAccountFromFile(pf, userName, &cr)) + { + if (strcmp(userName, u.name) == 0 && cr.accountNbr == r.accountNbr) + { + printf("✖ This Account already exists for this user\n\n"); + goto noAccount; + } + } + printf("\nEnter the country:"); + scanf("%s", r.country); + printf("\nEnter the phone number:"); + scanf("%d", &r.phone); + printf("\nEnter amount to deposit: $"); + scanf("%lf", &r.amount); + printf("\nChoose the type of account:\n\t-> saving\n\t-> current\n\t-> fixed01(for 1 year)\n\t-> fixed02(for 2 years)\n\t-> fixed03(for 3 years)\n\n\tEnter your choice:"); + scanf("%s", r.accountType); + + saveAccountToFile(pf, u.name, r); + + fclose(pf); + success(u); +} + +void checkAllAccounts(struct User u) +{ + char userName[100]; + struct Record r; + + FILE *pf = fopen(RECORDS, "r"); + + system("clear"); + printf("\t\t====== All accounts from user, %s =====\n\n", u.name); + while (getAccountFromFile(pf, userName, &r)) + { + if (strcmp(userName, u.name) == 0) + { + printf("_____________________\n"); + printf("\nAccount number:%d\nDeposit Date:%d/%d/%d \ncountry:%s \nPhone number:%d \nAmount deposited: $%.2f \nType Of Account:%s\n", + r.accountNbr, + r.deposit.day, + r.deposit.month, + r.deposit.year, + r.country, + r.phone, + r.amount, + r.accountType); + } + } + fclose(pf); + success(u); +} diff --git a/subjects/atm_management_system/audit/README.md b/subjects/atm_management_system/audit/README.md new file mode 100644 index 000000000..9847fda0b --- /dev/null +++ b/subjects/atm_management_system/audit/README.md @@ -0,0 +1,91 @@ +#### Functional + +##### Open the application and register a new user with the name `"Alice"` and the password `"q1w2e3r4t5y6"` + +###### Is this user saved in the file `"./data/users.txt"`, and if so are all credentials correct (name and password)? + +##### Open the application and register again the user `"Alice"`. + +###### Did it displayed an error message saying that this user already exists? + +##### Open the application and register again the user `"Alice"`, then open the file `"./data/users.txt"`. + +###### Are all the user names unique? (ex: no repetition on the name Alice) + +##### Try and login as `"Alice"`. + +###### Was Alice able to enter the main menu? + +##### Try to create two accounts using the user Alice, then select the option `"Update information of account"` and select an account number that does not exist for Alice. + +###### Did the application displayed some kind of error message saying that this account does not exist? + +##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. + +###### Did the the application prompt a choice of updating the **phone number** or the **country**? + +##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. + +###### Was the phone number of that account updated in the application and the file `"records.txt"`? + +##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. + +###### Was the country of that account updated in the application and the file `"records.txt"`? + +##### Utilizing the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. + +###### Did the application displayed the account information and the gain of $5.84 of interest on day 10 of every moth? + +##### Utilizing the user Alice create again an account but with account number `"320421"` and type of account `"fixed01"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. + +###### Did the application displayed the account information and the gain of $40.05 of interest on 10/10/2013? + +##### Utilizing the user Alice create again an account but with account number `"3214"` and type of account `"fixed02"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. + +###### Did the application displayed the account information and the gain of $100.12 of interest on 10/10/2014? + +##### Utilizing the user Alice create again an account but with account number `"3212"` and type of account `"fixed03"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. + +###### Did the application displayed the account information and the gain of $240.29 of interest on 10/10/2015? + +##### Utilizing the user Alice select the option `"Make transaction"`. Then choose the account with the id `"3212"` + +###### Are you able to choose between withdrawing or depositing? + +##### Utilizing the user Alice select the option `"Make transaction"`, choose the account with the id `"3212"`. Then try to withdraw money. + +###### Are you able to withdraw money? + +###### And if so, did the withdraw was updated in the file `"records.txt"`? + +###### Is it not possible to withdraw an amount superior to your available balance? + +##### Try to deposit money into the account `"3212"`. + +###### Were you able to deposit money into this account? + +###### And if so did it update the file `"records.txt"`? + +##### Utilizing the use Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. + +###### Can you confirm that those account were deleted, both in the application and file `"records.txt"`? + +##### Utilizing the use Alice select the option `"Remove existing account"` and try to remove and nonexisting account. + +###### Did the application prompt some king of error saying that the account does not exits? + +##### Create another user named `"Michel"`. Then by using the user Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. + +###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file named `"records.txt"`? + +#### Bonus + +###### +Did the student update the terminal interface? + +###### +Is the password saved in the file `"users.txt"` encrypted? + +###### +Did the student make their own Makefile? + +###### +Did the student add more features to the project? + +###### +Did the student optimise the code already given? \ No newline at end of file From 54f65c4832046c0e841a423e87fd71e9280104d1 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Tue, 2 Feb 2021 16:54:39 +0000 Subject: [PATCH 35/42] typos --- subjects/atm_management_system/README.md | 43 ++++++++++++------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md index 198a0880e..f036a0ed6 100644 --- a/subjects/atm_management_system/README.md +++ b/subjects/atm_management_system/README.md @@ -2,7 +2,7 @@ ### Objective -The objective for this projects is to show, that you have learned to program and you are able to adapt to new languages. +The objective for this project is to show that you have learned to program and you are able to adapt to new languages. The programming language you are about to use is [C](https://en.wikipedia.org/wiki/C_%28programming_language%29). It will not be asked to create a project from scratch, but **to add features or fix the code of a given application**. @@ -13,11 +13,11 @@ You will be provided with an ATM management system where users can do the follow - Login/Register - Create a new account -- Update information of existing account +- Update information of existing accounts - Check the details of existing accounts -- Check list of owned account -- Make transaction -- Remove existing account +- Check list of owned accounts +- Make transactions +- Remove existing accounts The application provided will just handle the **login**, **creation of new accounts** and **check list of owned accounts**. The rest of the features must be implemented by you. @@ -71,23 +71,24 @@ The following features must be done by you. 1. **Registration**, you must be able to register new users, it cannot exist users with the same name (names must be unique). They must be saved into the right file -2. **Update information of existing account**, users must be able to update their country or phone number\ +2. **Update information of existing account**, users must be able to update their country or phone number - 2.1. You must ask users to input the account id they want to change, followed by a prompt asking which field they want to also change (the only fields that are permitted to update is the phone number and the country). + 2.1. You must ask users to input the account id they want to change, followed by a prompt asking which field they want to also change (the only fields that are permitted to update is the phone number and the country). - 2.2. When ever users update an account it must be then saved into the corresponding file. + 2.2. Whenever users update an account, it must be saved into the corresponding file. -3. **Check the details of existing accounts**, users must able to check just one account. +3. **Check the details of existing accounts**, users must be able to check just one account at a time. - 3.1. For this it must be asked to input the account id they want to see + 3.1. For this it must be asked to input the account id they want to see - 3.2. If the account is either saving, fixed01, fixed02 and fixed03 the system will display - the information of that account and the interest you will acquire depending on the account: - - saving: rate interest 0.07% - - fixed01(1 year account): rate interest 0.04% - - fixed02(2 year account): rate interest 0.05% - - fixed03(3 year account): rate interest 0.08% - - If the account is current you must display `You will not get interests because the account is of type current` + 3.2. If the account is either saving, fixed01, fixed02 and fixed03 the system will display + the information of that account and the interest you will acquire depending on the account: + + - saving: rate interest 0.07% + - fixed01(1 year account): rate interest 0.04% + - fixed02(2 year account): rate interest 0.05% + - fixed03(3 year account): rate interest 0.08% + - If the account is current you must display `You will not get interests because the account is of type current` 4. **Make transaction**, users must be able to create transactions, withdrawing or depositing money to a certain account. All transactions must be updated and saved into the corresponding file @@ -96,14 +97,14 @@ The following features must be done by you. 6. **Transfer owner**, users can transfer their account to another user, by: - 6.1. Identifying the account and the user they want to transfer the ownership to + 6.1. Identifying the account and the user they want to transfer the ownership to - 6.2. Saving the information in the corresponding file + 6.2. Saving the information in the corresponding file ### Example You can find an example of the final application [here](TODO:link_to_youtube_video). Do not forget that you are free to -implement what ever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. +implement whatever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. ### Bonus @@ -116,7 +117,7 @@ You can create bonus features or update the terminal interface: This project will help you learn about: -- [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) languages +- [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) language - Language Fundamentals - Data manipulation - File [stdino](TODO:link) From 0950f6b522927ff1d8d2d3c64e0a1c13b6858acc Mon Sep 17 00:00:00 2001 From: lee Date: Tue, 2 Feb 2021 18:05:08 +0000 Subject: [PATCH 36/42] adding links --- subjects/atm_management_system/README.md | 2 +- subjects/atm_management_system/audit/README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md index f036a0ed6..dfc793724 100644 --- a/subjects/atm_management_system/README.md +++ b/subjects/atm_management_system/README.md @@ -120,7 +120,7 @@ This project will help you learn about: - [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) language - Language Fundamentals - Data manipulation - - File [stdino](TODO:link) + - File manipulation - Data structures - Makefile - Terminal UI diff --git a/subjects/atm_management_system/audit/README.md b/subjects/atm_management_system/audit/README.md index 9847fda0b..a7d33ed7f 100644 --- a/subjects/atm_management_system/audit/README.md +++ b/subjects/atm_management_system/audit/README.md @@ -66,17 +66,17 @@ ###### And if so did it update the file `"records.txt"`? -##### Utilizing the use Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. +##### Utilizing the user Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. ###### Can you confirm that those account were deleted, both in the application and file `"records.txt"`? -##### Utilizing the use Alice select the option `"Remove existing account"` and try to remove and nonexisting account. +##### Utilizing the user Alice select the option `"Remove existing account"` and try to remove and nonexisting account. ###### Did the application prompt some king of error saying that the account does not exits? ##### Create another user named `"Michel"`. Then by using the user Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. -###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file named `"records.txt"`? +###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file `"records.txt"`? #### Bonus From 88ed0cb9dbce761d8a23e8788908105c0293873f Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 3 Feb 2021 09:19:06 +0000 Subject: [PATCH 37/42] youtube link --- subjects/atm_management_system/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md index dfc793724..35ebc5afa 100644 --- a/subjects/atm_management_system/README.md +++ b/subjects/atm_management_system/README.md @@ -103,7 +103,7 @@ The following features must be done by you. ### Example -You can find an example of the final application [here](TODO:link_to_youtube_video). Do not forget that you are free to +You can find an example of the final application [here](https://www.youtube.com/watch?v=1LjwbIFt5Qo). Do not forget that you are free to implement whatever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. ### Bonus From 877a77616ddedd4b80403489864fb32849c69e27 Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 3 Feb 2021 10:24:56 +0000 Subject: [PATCH 38/42] typos --- .../atm_management_system/audit/README.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/subjects/atm_management_system/audit/README.md b/subjects/atm_management_system/audit/README.md index a7d33ed7f..95bcd0717 100644 --- a/subjects/atm_management_system/audit/README.md +++ b/subjects/atm_management_system/audit/README.md @@ -8,7 +8,7 @@ ###### Did it displayed an error message saying that this user already exists? -##### Open the application and register again the user `"Alice"`, then open the file `"./data/users.txt"`. +##### Open the file `"./data/users.txt"`. ###### Are all the user names unique? (ex: no repetition on the name Alice) @@ -20,43 +20,43 @@ ###### Did the application displayed some kind of error message saying that this account does not exist? -##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. ###### Did the the application prompt a choice of updating the **phone number** or the **country**? -##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. ###### Was the phone number of that account updated in the application and the file `"records.txt"`? -##### Utilizing the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. ###### Was the country of that account updated in the application and the file `"records.txt"`? -##### Utilizing the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. +##### Resorting to the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. ###### Did the application displayed the account information and the gain of $5.84 of interest on day 10 of every moth? -##### Utilizing the user Alice create again an account but with account number `"320421"` and type of account `"fixed01"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. +##### Resorting to the user Alice create again an account but with account number "320421" and type of account "fixed01" with the rest of the information as in the last account . Then select `"Check accounts"` and choose the account you just created. ###### Did the application displayed the account information and the gain of $40.05 of interest on 10/10/2013? -##### Utilizing the user Alice create again an account but with account number `"3214"` and type of account `"fixed02"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. +##### Resorting to the user Alice create again an account but with account number `"3214"` and type of account `"fixed02"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. ###### Did the application displayed the account information and the gain of $100.12 of interest on 10/10/2014? -##### Utilizing the user Alice create again an account but with account number `"3212"` and type of account `"fixed03"` the rest can be the same as the last account. Then select `"Check accounts"` choose the account you just created. +##### Resorting to the user Alice create again an account but with account number `"3212"` and type of account `"fixed03"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. ###### Did the application displayed the account information and the gain of $240.29 of interest on 10/10/2015? -##### Utilizing the user Alice select the option `"Make transaction"`. Then choose the account with the id `"3212"` +##### Resorting to the user Alice select the option `"Make transaction"`. Then choose the account with the id `"3212"` ###### Are you able to choose between withdrawing or depositing? -##### Utilizing the user Alice select the option `"Make transaction"`, choose the account with the id `"3212"`. Then try to withdraw money. +##### Resorting to the user Alice select the option `"Make transaction"`, choose the account with the id `"3212"`. Then try to withdraw money. ###### Are you able to withdraw money? -###### And if so, did the withdraw was updated in the file `"records.txt"`? +###### And if so, was the withdraw updated in the file `"records.txt"`? ###### Is it not possible to withdraw an amount superior to your available balance? @@ -66,15 +66,15 @@ ###### And if so did it update the file `"records.txt"`? -##### Utilizing the user Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. +##### Resorting to the user Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. ###### Can you confirm that those account were deleted, both in the application and file `"records.txt"`? -##### Utilizing the user Alice select the option `"Remove existing account"` and try to remove and nonexisting account. +##### Resorting to the user Alice select the option `"Remove existing account"` and try to remove and nonexisting account. -###### Did the application prompt some king of error saying that the account does not exits? +###### Did the application prompt some type of error saying that the account does not exists? -##### Create another user named `"Michel"`. Then by using the user Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. +##### Create another user named `"Michel"`. Then by using Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. ###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file `"records.txt"`? From f6747c9c5fd8e1b50c8ffe47225b626ea8258d1e Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 3 Feb 2021 18:51:58 +0000 Subject: [PATCH 39/42] adding bonus --- subjects/atm_management_system/README.md | 20 ++++++++++++------- .../atm_management_system/audit/README.md | 4 ++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md index 35ebc5afa..ac65c0a88 100644 --- a/subjects/atm_management_system/README.md +++ b/subjects/atm_management_system/README.md @@ -101,19 +101,24 @@ The following features must be done by you. 6.2. Saving the information in the corresponding file -### Example - -You can find an example of the final application [here](https://www.youtube.com/watch?v=1LjwbIFt5Qo). Do not forget that you are free to -implement whatever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. - ### Bonus -You can create bonus features or update the terminal interface: +As bonus you can add a verification to the field **Transfer owner**. Every time a user transfers ownership of an account the other user who received the account +can be alerted that it received and account from someone instantly. +Example if you have two terminals opened logged in two different users, and one send the account to the other user, +the user who received the account should be instantly notified +One of the ways of doing this is by using pipes and child processes (communication between process) + +You can also do more bonus features or update the terminal interface: - Better terminal interface - Encryption of passwords - Adding own Makefile -- Adding more features + +### Example + +You can find an example of the final application [here](https://www.youtube.com/watch?v=1LjwbIFt5Qo). Do not forget that you are free to +implement whatever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. This project will help you learn about: @@ -125,3 +130,4 @@ This project will help you learn about: - Makefile - Terminal UI - Memory management +- Pipes and child processes diff --git a/subjects/atm_management_system/audit/README.md b/subjects/atm_management_system/audit/README.md index 95bcd0717..db5ebf7ee 100644 --- a/subjects/atm_management_system/audit/README.md +++ b/subjects/atm_management_system/audit/README.md @@ -80,6 +80,10 @@ #### Bonus +##### Open two terminals and login with two different users. Then transfer ownership of an account to the other user. + +###### +Was the user whom received the account notified instantly? + ###### +Did the student update the terminal interface? ###### +Is the password saved in the file `"users.txt"` encrypted? From 36e7f070a244bafad0174568302168db9524b8d3 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 4 Feb 2021 18:28:13 +0000 Subject: [PATCH 40/42] readme review --- subjects/atm-management-system/README.md | 133 +++++++++++++++ .../atm-management-system/atm_system/Makefile | 16 ++ .../atm_system/data/records.txt | 6 + .../atm_system/data/users.txt | 2 + .../atm_system/src/auth.c | 59 +++++++ .../atm_system/src/header.h | 37 ++++ .../atm_system/src/main.c | 104 +++++++++++ .../atm_system/src/system.c | 161 ++++++++++++++++++ .../atm-management-system/audit/README.md | 95 +++++++++++ 9 files changed, 613 insertions(+) create mode 100644 subjects/atm-management-system/README.md create mode 100644 subjects/atm-management-system/atm_system/Makefile create mode 100644 subjects/atm-management-system/atm_system/data/records.txt create mode 100644 subjects/atm-management-system/atm_system/data/users.txt create mode 100644 subjects/atm-management-system/atm_system/src/auth.c create mode 100644 subjects/atm-management-system/atm_system/src/header.h create mode 100644 subjects/atm-management-system/atm_system/src/main.c create mode 100644 subjects/atm-management-system/atm_system/src/system.c create mode 100644 subjects/atm-management-system/audit/README.md diff --git a/subjects/atm-management-system/README.md b/subjects/atm-management-system/README.md new file mode 100644 index 000000000..8b72b6574 --- /dev/null +++ b/subjects/atm-management-system/README.md @@ -0,0 +1,133 @@ +## ATM + +### Objective + +The objective for this project is to show that you have acquired programming logic and that you are able to adapt to new languages. + +The programming language you are about to use is [C](https://en.wikipedia.org/wiki/C_%28programming_language%29). It will not be asked to create +a project from scratch, insted you will have **to add features or fix the code of a given application**. + +### Instructions + +You will be provided with an ATM management system where users can do the following actions: + +- Login/Register +- Create a new account +- Check the details of existing accounts +- Update information of existing accounts +- Remove existing accounts +- Check list of owned accounts +- Make transactions + +> The application provided will just handle the **login**, the **creation of new accounts** and **checking the list of owned accounts**. The rest of the features must +be implemented by yourself. + +### File System + +A folder which you can find [here](https://downgit.github.io/#/home?url=https://github.com/01-edu/public/tree/master/subjects/atm-management-system/atm-system/) is provided, this folder will have the following `fs`(file system): + +```console +. +| +├── data +│   ├── records.txt +│   └── users.txt +├── Makefile +├── README.md +└── src +    ├── auth.c +    ├── header.h +    ├── main.c +    └── system.c +``` + +The `data` folder presented above will contain information about the users and their accounts: + +- `users.txt` will be the a file that stores all information about each user +- `records.txt` will be the a file that stores all information relevant to the accounts for each user + +The format for the content saved in the file will be displayed like this : + +`users.txt` (name, password): + +```console +Alice 1234password +Michel password1234 +.... +``` + +`records.txt` (user name, account id, date of creation, country, phone nº, type of account) : + +```console +Alice 0 10/02/2020 german 986134231 11090830.00 current +Michel 2 10/10/2021 portugal 914134431 1920.42 savings +Alice 1 10/10/2000 finland 986134231 1234.21 savings +.... +``` + +### Features + +The following features must be implemented by yourself. + +1. The **Registration** feature, you must be able to register new users, users with the same name can not exist (names must be unique). They must be saved in the right file. + +2. The **Update information of existing account** feature, users must be able to update their country or phone number. + + 2.1. You must ask users to input the account `id` they want to change, followed by a prompt asking which field they want to also change (the only fields that are permitted to update is the phone number and the country). + + 2.2. Whenever users update an account, it must be saved into the corresponding file. + +3. The **Checking the details of existing accounts** feature, users must be able to check just one account at a time. + + 3.1. For this it must be asked to input the account id they want to see + + 3.2. If the account is either `savings`, `fixed01`, `fixed02` and `fixed03` the system will display + the information of that account and the interest you will acquire depending on the account: + + - savings: interest rate 0.07% + - fixed01(1 year account): interest rate 0.04% + - fixed02(2 year account): interest rate 0.05% + - fixed03(3 year account): interest rate 0.08% + - If the account is current you must display `You will not get interests because the account is of type current` + +4. The **Make transaction** feature, users must be able to create transactions, withdrawing or depositing money to a certain account. All transactions + must be updated and saved into the corresponding file. + +5. The **Remove existing account** feature, users must be able to delete their own account, the same must happen here, updates must be saved into the corresponding file. + +6. The **Transfer owner** feature, users can transfer their account to another user, by: + + 6.1. Identifying the account and the user they want to transfer the ownership to + + 6.2. Saving the information in the corresponding file + +### Bonus + +As bonus you can add a verification to the field **Transfer owner**. Every time a user transfers ownership of an account the other user who received the account +can be alerted that he or she received an account from someone instantly. +Example: if you have two terminals opened logged with two different users, and one send the account to the other user, +the user who received the account should be instantly notified. +One of the ways of doing this is by using pipes and child processes (communication between processes). + +You can also do more bonus features or update the terminal interface: + +- Better terminal interface (TUI) +- Encryption of passwords +- Adding your own Makefile + +### Example + +You can find an example of the final application [here](https://www.youtube.com/watch?v=xVtikDcGG2E). Do not forget that you are free to +implement whichever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. + +This project will help you learn about: + +- [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) language + - Language Fundamentals +- Data manipulation + - File manipulation + - Data structures +- Makefile +- Terminal UI +- Memory management +- Pipes and child processes diff --git a/subjects/atm-management-system/atm_system/Makefile b/subjects/atm-management-system/atm_system/Makefile new file mode 100644 index 000000000..62befd2c6 --- /dev/null +++ b/subjects/atm-management-system/atm_system/Makefile @@ -0,0 +1,16 @@ +objects = src/main.o src/system.o src/auth.o + +atm : $(objects) + cc -o atm $(objects) + +main.o : src/header.h +kbd.o : src/header.h +command.o : src/header.h +display.o : src/header.h +insert.o : src/header.h +search.o : src/header.h +files.o : src/header.h +utils.o : src/header.h + +clean : + rm -f $(objects) diff --git a/subjects/atm-management-system/atm_system/data/records.txt b/subjects/atm-management-system/atm_system/data/records.txt new file mode 100644 index 000000000..b9d75f71c --- /dev/null +++ b/subjects/atm-management-system/atm_system/data/records.txt @@ -0,0 +1,6 @@ +Alice 0 10/10/2012 Africa 291321234 22432.52 saving + +Michel 2 2/5/2001 Portugal 123543455 10023.230000 fixed01 + +Michel 123 10/10/2020 UK 1234123 12345.30 saving + diff --git a/subjects/atm-management-system/atm_system/data/users.txt b/subjects/atm-management-system/atm_system/data/users.txt new file mode 100644 index 000000000..00694cf8b --- /dev/null +++ b/subjects/atm-management-system/atm_system/data/users.txt @@ -0,0 +1,2 @@ +Alice q1w2e3r4t5y6 +Michel q1w2e3r4t5y6 diff --git a/subjects/atm-management-system/atm_system/src/auth.c b/subjects/atm-management-system/atm_system/src/auth.c new file mode 100644 index 000000000..c3e61b088 --- /dev/null +++ b/subjects/atm-management-system/atm_system/src/auth.c @@ -0,0 +1,59 @@ +#include +#include "header.h" + +char *USERS = "./data/users.txt"; + +void loginMenu(char a[50], char pass[50]) +{ + struct termios oflags, nflags; + + system("clear"); + printf("\n\n\n\t\t\t\t Bank Management System\n\t\t\t\t\t User Login:"); + scanf("%s", a); + + // disabling echo + tcgetattr(fileno(stdin), &oflags); + nflags = oflags; + nflags.c_lflag &= ~ECHO; + nflags.c_lflag |= ECHONL; + + if (tcsetattr(fileno(stdin), TCSANOW, &nflags) != 0) + { + perror("tcsetattr"); + return exit(1); + } + printf("\n\n\n\n\n\t\t\t\tEnter the password to login:"); + scanf("%s", pass); + + // restore terminal + if (tcsetattr(fileno(stdin), TCSANOW, &oflags) != 0) + { + perror("tcsetattr"); + return exit(1); + } +}; + +const char *getPassword(struct User u) +{ + FILE *fp; + struct User userChecker; + + if ((fp = fopen("./data/users.txt", "r")) == NULL) + { + printf("Error! opening file"); + exit(1); + } + + while (fscanf(fp, "%s %s", userChecker.name, userChecker.password) != EOF) + { + if (strcmp(userChecker.name, u.name) == 0) + { + fclose(fp); + char *buff = userChecker.password; + return buff; + } + } + + fclose(fp); + return "no user found"; +} \ No newline at end of file diff --git a/subjects/atm-management-system/atm_system/src/header.h b/subjects/atm-management-system/atm_system/src/header.h new file mode 100644 index 000000000..61d7971a3 --- /dev/null +++ b/subjects/atm-management-system/atm_system/src/header.h @@ -0,0 +1,37 @@ +#include +#include +#include + +struct Date +{ + int month, day, year; +}; + +// all fields for each record of an account +struct Record +{ + char name[100]; + char country[100]; + int phone; + char accountType[10]; + int accountNbr; + double amount; + struct Date deposit; + struct Date withdraw; +}; + +struct User +{ + char name[50]; + char password[50]; +}; + +// authentication functions +void loginMenu(char a[50], char pass[50]); +void registerMenu(char a[50], char pass[50]); +const char *getPassword(struct User u); + +// system function +void createNewAcc(struct User u); +void mainMenu(struct User u); +void checkAllAccounts(struct User u); diff --git a/subjects/atm-management-system/atm_system/src/main.c b/subjects/atm-management-system/atm_system/src/main.c new file mode 100644 index 000000000..9829a876c --- /dev/null +++ b/subjects/atm-management-system/atm_system/src/main.c @@ -0,0 +1,104 @@ +#include "header.h" + +void mainMenu(struct User u) +{ + int option; + system("clear"); + printf("\n\n\t\t======= ATM =======\n\n"); + printf("\n\t\t-->> Feel free to choose one of the options below <<--\n"); + printf("\n\t\t[1]- Create a new account\n"); + printf("\n\t\t[2]- Update information of account\n"); + printf("\n\t\t[3]- Check accounts\n"); + printf("\n\t\t[4]- Check list of owned account\n"); + printf("\n\t\t[5]- Make Transaction\n"); + printf("\n\t\t[6]- Remove existing account\n"); + printf("\n\t\t[7]- Transfer ownership\n"); + printf("\n\t\t[8]- Exit\n"); + scanf("%d", &option); + + switch (option) + { + case 1: + createNewAcc(u); + break; + case 2: + // student TODO : add your **Update information of existing account** function + // here + break; + case 3: + // student TODO : add your **Check the details of existing accounts** function + // here + break; + case 4: + checkAllAccounts(u); + break; + case 5: + // student TODO : add your **Make transaction** function + // here + break; + case 6: + // student TODO : add your **Remove existing account** function + // here + break; + case 7: + // student TODO : add your **Transfer owner** function + // here + break; + case 8: + exit(1); + break; + default: + printf("Invalid operation!\n"); + } +}; + +void initMenu(struct User *u) +{ + int r = 0; + int option; + system("clear"); + printf("\n\n\t\t======= ATM =======\n"); + printf("\n\t\t-->> Feel free to login / register :\n"); + printf("\n\t\t[1]- login\n"); + printf("\n\t\t[2]- register\n"); + printf("\n\t\t[3]- exit\n"); + while (!r) + { + scanf("%d", &option); + switch (option) + { + case 1: + loginMenu(u->name, u->password); + if (strcmp(u->password, getPassword(*u)) == 0) + { + printf("\n\nPassword Match!"); + } + else + { + printf("\nWrong password!! or User Name\n"); + exit(1); + } + r = 1; + break; + case 2: + // student TODO : add your **Registration** function + // here + r = 1; + break; + case 3: + exit(1); + break; + default: + printf("Insert a valid operation!\n"); + } + } +}; + +int main() +{ + struct User u; + + initMenu(&u); + mainMenu(u); + return 0; +} diff --git a/subjects/atm-management-system/atm_system/src/system.c b/subjects/atm-management-system/atm_system/src/system.c new file mode 100644 index 000000000..1a5f03c92 --- /dev/null +++ b/subjects/atm-management-system/atm_system/src/system.c @@ -0,0 +1,161 @@ +#include "header.h" + +const char *RECORDS = "./data/records.txt"; + +int getAccountFromFile(FILE *ptr, char name[50], struct Record *r) +{ + return fscanf(ptr, "%s %d %d/%d/%d %s %d %lf %s", + name, + &r->accountNbr, + &r->deposit.month, + &r->deposit.day, + &r->deposit.year, + r->country, + &r->phone, + &r->amount, + r->accountType) != EOF; +} + +void saveAccountToFile(FILE *ptr, char name[50], struct Record r) +{ + fprintf(ptr, "%s %d %d/%d/%d %s %d %.2lf %s\n\n", + name, + r.accountNbr, + r.deposit.month, + r.deposit.day, + r.deposit.year, + r.country, + r.phone, + r.amount, + r.accountType); +} + +void stayOrReturn(int notGood, void f(struct User u), struct User u) +{ + int option; + if (notGood == 0) + { + system("clear"); + printf("\n✖ Record not found!!\n"); + invalid: + printf("\nEnter 0 to try again, 1 to return to main menu and 2 to exit:"); + scanf("%d", &option); + if (option == 0) + f(u); + else if (option == 1) + mainMenu(u); + else if (option == 2) + exit(0); + else + { + printf("Insert a valid operation!\n"); + goto invalid; + } + } + else + { + printf("\nEnter 1 to go to the main menu and 0 to exit:"); + scanf("%d", &option); + } + if (option == 1) + { + system("clear"); + mainMenu(u); + } + else + { + system("clear"); + exit(1); + } +} + +void success(struct User u) +{ + int option; + printf("\n✔ Success!\n\n"); +invalid: + printf("Enter 1 to go to the main menu and 0 to exit!\n"); + scanf("%d", &option); + system("clear"); + if (option == 1) + { + mainMenu(u); + } + else if (option == 0) + { + exit(1); + } + else + { + printf("Insert a valid operation!\n"); + goto invalid; + } +} + +void createNewAcc(struct User u) +{ + struct Record r; + struct Record cr; + char userName[50]; + FILE *pf = fopen(RECORDS, "a+"); + +noAccount: + system("clear"); + printf("\t\t\t===== New record =====\n"); + + printf("\nEnter today's date(mm/dd/yyyy):"); + scanf("%d/%d/%d", &r.deposit.month, &r.deposit.day, &r.deposit.year); + printf("\nEnter the account number:"); + scanf("%d", &r.accountNbr); + + while (getAccountFromFile(pf, userName, &cr)) + { + if (strcmp(userName, u.name) == 0 && cr.accountNbr == r.accountNbr) + { + printf("✖ This Account already exists for this user\n\n"); + goto noAccount; + } + } + printf("\nEnter the country:"); + scanf("%s", r.country); + printf("\nEnter the phone number:"); + scanf("%d", &r.phone); + printf("\nEnter amount to deposit: $"); + scanf("%lf", &r.amount); + printf("\nChoose the type of account:\n\t-> saving\n\t-> current\n\t-> fixed01(for 1 year)\n\t-> fixed02(for 2 years)\n\t-> fixed03(for 3 years)\n\n\tEnter your choice:"); + scanf("%s", r.accountType); + + saveAccountToFile(pf, u.name, r); + + fclose(pf); + success(u); +} + +void checkAllAccounts(struct User u) +{ + char userName[100]; + struct Record r; + + FILE *pf = fopen(RECORDS, "r"); + + system("clear"); + printf("\t\t====== All accounts from user, %s =====\n\n", u.name); + while (getAccountFromFile(pf, userName, &r)) + { + if (strcmp(userName, u.name) == 0) + { + printf("_____________________\n"); + printf("\nAccount number:%d\nDeposit Date:%d/%d/%d \ncountry:%s \nPhone number:%d \nAmount deposited: $%.2f \nType Of Account:%s\n", + r.accountNbr, + r.deposit.day, + r.deposit.month, + r.deposit.year, + r.country, + r.phone, + r.amount, + r.accountType); + } + } + fclose(pf); + success(u); +} diff --git a/subjects/atm-management-system/audit/README.md b/subjects/atm-management-system/audit/README.md new file mode 100644 index 000000000..db5ebf7ee --- /dev/null +++ b/subjects/atm-management-system/audit/README.md @@ -0,0 +1,95 @@ +#### Functional + +##### Open the application and register a new user with the name `"Alice"` and the password `"q1w2e3r4t5y6"` + +###### Is this user saved in the file `"./data/users.txt"`, and if so are all credentials correct (name and password)? + +##### Open the application and register again the user `"Alice"`. + +###### Did it displayed an error message saying that this user already exists? + +##### Open the file `"./data/users.txt"`. + +###### Are all the user names unique? (ex: no repetition on the name Alice) + +##### Try and login as `"Alice"`. + +###### Was Alice able to enter the main menu? + +##### Try to create two accounts using the user Alice, then select the option `"Update information of account"` and select an account number that does not exist for Alice. + +###### Did the application displayed some kind of error message saying that this account does not exist? + +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. + +###### Did the the application prompt a choice of updating the **phone number** or the **country**? + +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. + +###### Was the phone number of that account updated in the application and the file `"records.txt"`? + +##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. + +###### Was the country of that account updated in the application and the file `"records.txt"`? + +##### Resorting to the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. + +###### Did the application displayed the account information and the gain of $5.84 of interest on day 10 of every moth? + +##### Resorting to the user Alice create again an account but with account number "320421" and type of account "fixed01" with the rest of the information as in the last account . Then select `"Check accounts"` and choose the account you just created. + +###### Did the application displayed the account information and the gain of $40.05 of interest on 10/10/2013? + +##### Resorting to the user Alice create again an account but with account number `"3214"` and type of account `"fixed02"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. + +###### Did the application displayed the account information and the gain of $100.12 of interest on 10/10/2014? + +##### Resorting to the user Alice create again an account but with account number `"3212"` and type of account `"fixed03"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. + +###### Did the application displayed the account information and the gain of $240.29 of interest on 10/10/2015? + +##### Resorting to the user Alice select the option `"Make transaction"`. Then choose the account with the id `"3212"` + +###### Are you able to choose between withdrawing or depositing? + +##### Resorting to the user Alice select the option `"Make transaction"`, choose the account with the id `"3212"`. Then try to withdraw money. + +###### Are you able to withdraw money? + +###### And if so, was the withdraw updated in the file `"records.txt"`? + +###### Is it not possible to withdraw an amount superior to your available balance? + +##### Try to deposit money into the account `"3212"`. + +###### Were you able to deposit money into this account? + +###### And if so did it update the file `"records.txt"`? + +##### Resorting to the user Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. + +###### Can you confirm that those account were deleted, both in the application and file `"records.txt"`? + +##### Resorting to the user Alice select the option `"Remove existing account"` and try to remove and nonexisting account. + +###### Did the application prompt some type of error saying that the account does not exists? + +##### Create another user named `"Michel"`. Then by using Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. + +###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file `"records.txt"`? + +#### Bonus + +##### Open two terminals and login with two different users. Then transfer ownership of an account to the other user. + +###### +Was the user whom received the account notified instantly? + +###### +Did the student update the terminal interface? + +###### +Is the password saved in the file `"users.txt"` encrypted? + +###### +Did the student make their own Makefile? + +###### +Did the student add more features to the project? + +###### +Did the student optimise the code already given? \ No newline at end of file From 513ec227f615975db52b3f6a3754ff88bc69971a Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 5 Feb 2021 16:11:35 +0000 Subject: [PATCH 41/42] correction of audit and removal of extra folder --- .../atm-management-system/audit/README.md | 20 +-- subjects/atm_management_system/README.md | 133 --------------- .../atm_management_system/atm_system/Makefile | 16 -- .../atm_system/data/records.txt | 6 - .../atm_system/data/users.txt | 2 - .../atm_system/src/auth.c | 59 ------- .../atm_system/src/header.h | 37 ---- .../atm_system/src/main.c | 104 ----------- .../atm_system/src/system.c | 161 ------------------ .../atm_management_system/audit/README.md | 95 ----------- 10 files changed, 10 insertions(+), 623 deletions(-) delete mode 100644 subjects/atm_management_system/README.md delete mode 100644 subjects/atm_management_system/atm_system/Makefile delete mode 100644 subjects/atm_management_system/atm_system/data/records.txt delete mode 100644 subjects/atm_management_system/atm_system/data/users.txt delete mode 100644 subjects/atm_management_system/atm_system/src/auth.c delete mode 100644 subjects/atm_management_system/atm_system/src/header.h delete mode 100644 subjects/atm_management_system/atm_system/src/main.c delete mode 100644 subjects/atm_management_system/atm_system/src/system.c delete mode 100644 subjects/atm_management_system/audit/README.md diff --git a/subjects/atm-management-system/audit/README.md b/subjects/atm-management-system/audit/README.md index db5ebf7ee..caf2ae7b5 100644 --- a/subjects/atm-management-system/audit/README.md +++ b/subjects/atm-management-system/audit/README.md @@ -1,16 +1,16 @@ #### Functional -##### Open the application and register a new user with the name `"Alice"` and the password `"q1w2e3r4t5y6"` +##### Open the application and register a new user with the name `"Alice"` and the password `"q1w2e3r4t5y6"`. -###### Is this user saved in the file `"./data/users.txt"`, and if so are all credentials correct (name and password)? +###### Is this user saved in the file `"./data/users.txt"`, and if so, are all credentials correct (name and password)? -##### Open the application and register again the user `"Alice"`. +##### Open the application and re-register the user `"Alice"`. -###### Did it displayed an error message saying that this user already exists? +###### Did it display an error message stating that this user already exist? ##### Open the file `"./data/users.txt"`. -###### Are all the user names unique? (ex: no repetition on the name Alice) +###### Are all the user's names unique? (ex: no repetition on the name Alice) ##### Try and login as `"Alice"`. @@ -18,21 +18,21 @@ ##### Try to create two accounts using the user Alice, then select the option `"Update information of account"` and select an account number that does not exist for Alice. -###### Did the application displayed some kind of error message saying that this account does not exist? +###### Did the application displayed some kind of error message stating that this account does not exist? -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. +##### Resorting to the user Alice, try and select the option `"Update information of account"` and select one of the accounts you created for Alice. ###### Did the the application prompt a choice of updating the **phone number** or the **country**? -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. +##### Resorting to the user Alice, try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. ###### Was the phone number of that account updated in the application and the file `"records.txt"`? -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. +##### Resorting to the user Alice, try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. ###### Was the country of that account updated in the application and the file `"records.txt"`? -##### Resorting to the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. +##### Resorting to the user Alice, try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. ###### Did the application displayed the account information and the gain of $5.84 of interest on day 10 of every moth? diff --git a/subjects/atm_management_system/README.md b/subjects/atm_management_system/README.md deleted file mode 100644 index ac65c0a88..000000000 --- a/subjects/atm_management_system/README.md +++ /dev/null @@ -1,133 +0,0 @@ -## ATM - -### Objective - -The objective for this project is to show that you have learned to program and you are able to adapt to new languages. - -The programming language you are about to use is [C](https://en.wikipedia.org/wiki/C_%28programming_language%29). It will not be asked to create -a project from scratch, but **to add features or fix the code of a given application**. - -### Instructions - -You will be provided with an ATM management system where users can do the following actions: - -- Login/Register -- Create a new account -- Update information of existing accounts -- Check the details of existing accounts -- Check list of owned accounts -- Make transactions -- Remove existing accounts - -The application provided will just handle the **login**, **creation of new accounts** and **check list of owned accounts**. The rest of the features must -be implemented by you. - -### File System - -It will be provided a folder that you can find [here](https://downgit.github.io/#/home?url=https://github.com/01-edu/public/tree/master/subjects/atm-management-system/atm-system/), this folder will have the following fs: - -```console -. -| -├── data -│   ├── records.txt -│   └── users.txt -├── Makefile -├── README.md -└── src -    ├── auth.c -    ├── header.h -    ├── main.c -    └── system.c -``` - -The `data` folder presented above will contain information about the users and their accounts: - -- `users.txt` will be the a file that stores all information about each user -- `records.txt` will be the a file that stores all information relevant to the accounts for each user - -The format for the content saved in the file will be displayed like this : - -`users.txt` (name, password): - -```console -Alice 1234password -Michel password1234 -.... -``` - -`records.txt` (user name, account id, date of creation, country, phone nº, type of account) : - -```console -Alice 0 10/02/2020 german 986134231 11090830.00 current -Michel 2 10/10/2021 portugal 914134431 1920.42 saving -Alice 1 10/10/2000 finland 986134231 1234.21 saving -.... -``` - -### Features - -The following features must be done by you. - -1. **Registration**, you must be able to register new users, it cannot exist users with the same name (names must be unique). They must be saved into the right file - -2. **Update information of existing account**, users must be able to update their country or phone number - - 2.1. You must ask users to input the account id they want to change, followed by a prompt asking which field they want to also change (the only fields that are permitted to update is the phone number and the country). - - 2.2. Whenever users update an account, it must be saved into the corresponding file. - -3. **Check the details of existing accounts**, users must be able to check just one account at a time. - - 3.1. For this it must be asked to input the account id they want to see - - 3.2. If the account is either saving, fixed01, fixed02 and fixed03 the system will display - the information of that account and the interest you will acquire depending on the account: - - - saving: rate interest 0.07% - - fixed01(1 year account): rate interest 0.04% - - fixed02(2 year account): rate interest 0.05% - - fixed03(3 year account): rate interest 0.08% - - If the account is current you must display `You will not get interests because the account is of type current` - -4. **Make transaction**, users must be able to create transactions, withdrawing or depositing money to a certain account. All transactions - must be updated and saved into the corresponding file - -5. **Remove existing account**, users must be able to delete their own account, same must happened here, updates must be saved into the corresponding file. - -6. **Transfer owner**, users can transfer their account to another user, by: - - 6.1. Identifying the account and the user they want to transfer the ownership to - - 6.2. Saving the information in the corresponding file - -### Bonus - -As bonus you can add a verification to the field **Transfer owner**. Every time a user transfers ownership of an account the other user who received the account -can be alerted that it received and account from someone instantly. -Example if you have two terminals opened logged in two different users, and one send the account to the other user, -the user who received the account should be instantly notified -One of the ways of doing this is by using pipes and child processes (communication between process) - -You can also do more bonus features or update the terminal interface: - -- Better terminal interface -- Encryption of passwords -- Adding own Makefile - -### Example - -You can find an example of the final application [here](https://www.youtube.com/watch?v=1LjwbIFt5Qo). Do not forget that you are free to -implement whatever kind of interface you desire. It just needs to obey the instructions given above so it can pass the audit. - -This project will help you learn about: - -- [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) language - - Language Fundamentals -- Data manipulation - - File manipulation - - Data structures -- Makefile -- Terminal UI -- Memory management -- Pipes and child processes diff --git a/subjects/atm_management_system/atm_system/Makefile b/subjects/atm_management_system/atm_system/Makefile deleted file mode 100644 index 62befd2c6..000000000 --- a/subjects/atm_management_system/atm_system/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -objects = src/main.o src/system.o src/auth.o - -atm : $(objects) - cc -o atm $(objects) - -main.o : src/header.h -kbd.o : src/header.h -command.o : src/header.h -display.o : src/header.h -insert.o : src/header.h -search.o : src/header.h -files.o : src/header.h -utils.o : src/header.h - -clean : - rm -f $(objects) diff --git a/subjects/atm_management_system/atm_system/data/records.txt b/subjects/atm_management_system/atm_system/data/records.txt deleted file mode 100644 index b9d75f71c..000000000 --- a/subjects/atm_management_system/atm_system/data/records.txt +++ /dev/null @@ -1,6 +0,0 @@ -Alice 0 10/10/2012 Africa 291321234 22432.52 saving - -Michel 2 2/5/2001 Portugal 123543455 10023.230000 fixed01 - -Michel 123 10/10/2020 UK 1234123 12345.30 saving - diff --git a/subjects/atm_management_system/atm_system/data/users.txt b/subjects/atm_management_system/atm_system/data/users.txt deleted file mode 100644 index 00694cf8b..000000000 --- a/subjects/atm_management_system/atm_system/data/users.txt +++ /dev/null @@ -1,2 +0,0 @@ -Alice q1w2e3r4t5y6 -Michel q1w2e3r4t5y6 diff --git a/subjects/atm_management_system/atm_system/src/auth.c b/subjects/atm_management_system/atm_system/src/auth.c deleted file mode 100644 index c3e61b088..000000000 --- a/subjects/atm_management_system/atm_system/src/auth.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include "header.h" - -char *USERS = "./data/users.txt"; - -void loginMenu(char a[50], char pass[50]) -{ - struct termios oflags, nflags; - - system("clear"); - printf("\n\n\n\t\t\t\t Bank Management System\n\t\t\t\t\t User Login:"); - scanf("%s", a); - - // disabling echo - tcgetattr(fileno(stdin), &oflags); - nflags = oflags; - nflags.c_lflag &= ~ECHO; - nflags.c_lflag |= ECHONL; - - if (tcsetattr(fileno(stdin), TCSANOW, &nflags) != 0) - { - perror("tcsetattr"); - return exit(1); - } - printf("\n\n\n\n\n\t\t\t\tEnter the password to login:"); - scanf("%s", pass); - - // restore terminal - if (tcsetattr(fileno(stdin), TCSANOW, &oflags) != 0) - { - perror("tcsetattr"); - return exit(1); - } -}; - -const char *getPassword(struct User u) -{ - FILE *fp; - struct User userChecker; - - if ((fp = fopen("./data/users.txt", "r")) == NULL) - { - printf("Error! opening file"); - exit(1); - } - - while (fscanf(fp, "%s %s", userChecker.name, userChecker.password) != EOF) - { - if (strcmp(userChecker.name, u.name) == 0) - { - fclose(fp); - char *buff = userChecker.password; - return buff; - } - } - - fclose(fp); - return "no user found"; -} \ No newline at end of file diff --git a/subjects/atm_management_system/atm_system/src/header.h b/subjects/atm_management_system/atm_system/src/header.h deleted file mode 100644 index 61d7971a3..000000000 --- a/subjects/atm_management_system/atm_system/src/header.h +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include - -struct Date -{ - int month, day, year; -}; - -// all fields for each record of an account -struct Record -{ - char name[100]; - char country[100]; - int phone; - char accountType[10]; - int accountNbr; - double amount; - struct Date deposit; - struct Date withdraw; -}; - -struct User -{ - char name[50]; - char password[50]; -}; - -// authentication functions -void loginMenu(char a[50], char pass[50]); -void registerMenu(char a[50], char pass[50]); -const char *getPassword(struct User u); - -// system function -void createNewAcc(struct User u); -void mainMenu(struct User u); -void checkAllAccounts(struct User u); diff --git a/subjects/atm_management_system/atm_system/src/main.c b/subjects/atm_management_system/atm_system/src/main.c deleted file mode 100644 index 9829a876c..000000000 --- a/subjects/atm_management_system/atm_system/src/main.c +++ /dev/null @@ -1,104 +0,0 @@ -#include "header.h" - -void mainMenu(struct User u) -{ - int option; - system("clear"); - printf("\n\n\t\t======= ATM =======\n\n"); - printf("\n\t\t-->> Feel free to choose one of the options below <<--\n"); - printf("\n\t\t[1]- Create a new account\n"); - printf("\n\t\t[2]- Update information of account\n"); - printf("\n\t\t[3]- Check accounts\n"); - printf("\n\t\t[4]- Check list of owned account\n"); - printf("\n\t\t[5]- Make Transaction\n"); - printf("\n\t\t[6]- Remove existing account\n"); - printf("\n\t\t[7]- Transfer ownership\n"); - printf("\n\t\t[8]- Exit\n"); - scanf("%d", &option); - - switch (option) - { - case 1: - createNewAcc(u); - break; - case 2: - // student TODO : add your **Update information of existing account** function - // here - break; - case 3: - // student TODO : add your **Check the details of existing accounts** function - // here - break; - case 4: - checkAllAccounts(u); - break; - case 5: - // student TODO : add your **Make transaction** function - // here - break; - case 6: - // student TODO : add your **Remove existing account** function - // here - break; - case 7: - // student TODO : add your **Transfer owner** function - // here - break; - case 8: - exit(1); - break; - default: - printf("Invalid operation!\n"); - } -}; - -void initMenu(struct User *u) -{ - int r = 0; - int option; - system("clear"); - printf("\n\n\t\t======= ATM =======\n"); - printf("\n\t\t-->> Feel free to login / register :\n"); - printf("\n\t\t[1]- login\n"); - printf("\n\t\t[2]- register\n"); - printf("\n\t\t[3]- exit\n"); - while (!r) - { - scanf("%d", &option); - switch (option) - { - case 1: - loginMenu(u->name, u->password); - if (strcmp(u->password, getPassword(*u)) == 0) - { - printf("\n\nPassword Match!"); - } - else - { - printf("\nWrong password!! or User Name\n"); - exit(1); - } - r = 1; - break; - case 2: - // student TODO : add your **Registration** function - // here - r = 1; - break; - case 3: - exit(1); - break; - default: - printf("Insert a valid operation!\n"); - } - } -}; - -int main() -{ - struct User u; - - initMenu(&u); - mainMenu(u); - return 0; -} diff --git a/subjects/atm_management_system/atm_system/src/system.c b/subjects/atm_management_system/atm_system/src/system.c deleted file mode 100644 index 1a5f03c92..000000000 --- a/subjects/atm_management_system/atm_system/src/system.c +++ /dev/null @@ -1,161 +0,0 @@ -#include "header.h" - -const char *RECORDS = "./data/records.txt"; - -int getAccountFromFile(FILE *ptr, char name[50], struct Record *r) -{ - return fscanf(ptr, "%s %d %d/%d/%d %s %d %lf %s", - name, - &r->accountNbr, - &r->deposit.month, - &r->deposit.day, - &r->deposit.year, - r->country, - &r->phone, - &r->amount, - r->accountType) != EOF; -} - -void saveAccountToFile(FILE *ptr, char name[50], struct Record r) -{ - fprintf(ptr, "%s %d %d/%d/%d %s %d %.2lf %s\n\n", - name, - r.accountNbr, - r.deposit.month, - r.deposit.day, - r.deposit.year, - r.country, - r.phone, - r.amount, - r.accountType); -} - -void stayOrReturn(int notGood, void f(struct User u), struct User u) -{ - int option; - if (notGood == 0) - { - system("clear"); - printf("\n✖ Record not found!!\n"); - invalid: - printf("\nEnter 0 to try again, 1 to return to main menu and 2 to exit:"); - scanf("%d", &option); - if (option == 0) - f(u); - else if (option == 1) - mainMenu(u); - else if (option == 2) - exit(0); - else - { - printf("Insert a valid operation!\n"); - goto invalid; - } - } - else - { - printf("\nEnter 1 to go to the main menu and 0 to exit:"); - scanf("%d", &option); - } - if (option == 1) - { - system("clear"); - mainMenu(u); - } - else - { - system("clear"); - exit(1); - } -} - -void success(struct User u) -{ - int option; - printf("\n✔ Success!\n\n"); -invalid: - printf("Enter 1 to go to the main menu and 0 to exit!\n"); - scanf("%d", &option); - system("clear"); - if (option == 1) - { - mainMenu(u); - } - else if (option == 0) - { - exit(1); - } - else - { - printf("Insert a valid operation!\n"); - goto invalid; - } -} - -void createNewAcc(struct User u) -{ - struct Record r; - struct Record cr; - char userName[50]; - FILE *pf = fopen(RECORDS, "a+"); - -noAccount: - system("clear"); - printf("\t\t\t===== New record =====\n"); - - printf("\nEnter today's date(mm/dd/yyyy):"); - scanf("%d/%d/%d", &r.deposit.month, &r.deposit.day, &r.deposit.year); - printf("\nEnter the account number:"); - scanf("%d", &r.accountNbr); - - while (getAccountFromFile(pf, userName, &cr)) - { - if (strcmp(userName, u.name) == 0 && cr.accountNbr == r.accountNbr) - { - printf("✖ This Account already exists for this user\n\n"); - goto noAccount; - } - } - printf("\nEnter the country:"); - scanf("%s", r.country); - printf("\nEnter the phone number:"); - scanf("%d", &r.phone); - printf("\nEnter amount to deposit: $"); - scanf("%lf", &r.amount); - printf("\nChoose the type of account:\n\t-> saving\n\t-> current\n\t-> fixed01(for 1 year)\n\t-> fixed02(for 2 years)\n\t-> fixed03(for 3 years)\n\n\tEnter your choice:"); - scanf("%s", r.accountType); - - saveAccountToFile(pf, u.name, r); - - fclose(pf); - success(u); -} - -void checkAllAccounts(struct User u) -{ - char userName[100]; - struct Record r; - - FILE *pf = fopen(RECORDS, "r"); - - system("clear"); - printf("\t\t====== All accounts from user, %s =====\n\n", u.name); - while (getAccountFromFile(pf, userName, &r)) - { - if (strcmp(userName, u.name) == 0) - { - printf("_____________________\n"); - printf("\nAccount number:%d\nDeposit Date:%d/%d/%d \ncountry:%s \nPhone number:%d \nAmount deposited: $%.2f \nType Of Account:%s\n", - r.accountNbr, - r.deposit.day, - r.deposit.month, - r.deposit.year, - r.country, - r.phone, - r.amount, - r.accountType); - } - } - fclose(pf); - success(u); -} diff --git a/subjects/atm_management_system/audit/README.md b/subjects/atm_management_system/audit/README.md deleted file mode 100644 index db5ebf7ee..000000000 --- a/subjects/atm_management_system/audit/README.md +++ /dev/null @@ -1,95 +0,0 @@ -#### Functional - -##### Open the application and register a new user with the name `"Alice"` and the password `"q1w2e3r4t5y6"` - -###### Is this user saved in the file `"./data/users.txt"`, and if so are all credentials correct (name and password)? - -##### Open the application and register again the user `"Alice"`. - -###### Did it displayed an error message saying that this user already exists? - -##### Open the file `"./data/users.txt"`. - -###### Are all the user names unique? (ex: no repetition on the name Alice) - -##### Try and login as `"Alice"`. - -###### Was Alice able to enter the main menu? - -##### Try to create two accounts using the user Alice, then select the option `"Update information of account"` and select an account number that does not exist for Alice. - -###### Did the application displayed some kind of error message saying that this account does not exist? - -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. - -###### Did the the application prompt a choice of updating the **phone number** or the **country**? - -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the phone number of that account. - -###### Was the phone number of that account updated in the application and the file `"records.txt"`? - -##### Resorting to the user Alice try and select the option `"Update information of account"` and select one of the accounts you created for Alice. Then update the country of that account. - -###### Was the country of that account updated in the application and the file `"records.txt"`? - -##### Resorting to the user Alice try to create a new account with: date `"10/10/2012"` account number `"834213"`, country `"UK"`, phone number `"291231392"`, deposit amount $`"1001.20"`, type of account `"saving"`. Then select `"Check accounts"` choose the account you just created. - -###### Did the application displayed the account information and the gain of $5.84 of interest on day 10 of every moth? - -##### Resorting to the user Alice create again an account but with account number "320421" and type of account "fixed01" with the rest of the information as in the last account . Then select `"Check accounts"` and choose the account you just created. - -###### Did the application displayed the account information and the gain of $40.05 of interest on 10/10/2013? - -##### Resorting to the user Alice create again an account but with account number `"3214"` and type of account `"fixed02"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. - -###### Did the application displayed the account information and the gain of $100.12 of interest on 10/10/2014? - -##### Resorting to the user Alice create again an account but with account number `"3212"` and type of account `"fixed03"` with the rest of the information as in the last account. Then select `"Check accounts"` and choose the account you just created. - -###### Did the application displayed the account information and the gain of $240.29 of interest on 10/10/2015? - -##### Resorting to the user Alice select the option `"Make transaction"`. Then choose the account with the id `"3212"` - -###### Are you able to choose between withdrawing or depositing? - -##### Resorting to the user Alice select the option `"Make transaction"`, choose the account with the id `"3212"`. Then try to withdraw money. - -###### Are you able to withdraw money? - -###### And if so, was the withdraw updated in the file `"records.txt"`? - -###### Is it not possible to withdraw an amount superior to your available balance? - -##### Try to deposit money into the account `"3212"`. - -###### Were you able to deposit money into this account? - -###### And if so did it update the file `"records.txt"`? - -##### Resorting to the user Alice try to select the option `"Remove existing account"` and remove the accounts `"834213"`, `"320421"` and `"3214"`. - -###### Can you confirm that those account were deleted, both in the application and file `"records.txt"`? - -##### Resorting to the user Alice select the option `"Remove existing account"` and try to remove and nonexisting account. - -###### Did the application prompt some type of error saying that the account does not exists? - -##### Create another user named `"Michel"`. Then by using Alice select the option `"transfer owner"` and try to transfer ownership of the account `"3212"` to Michel. - -###### Were you able to transfer the ownership of this account to Michel? And if so did it update both application and file `"records.txt"`? - -#### Bonus - -##### Open two terminals and login with two different users. Then transfer ownership of an account to the other user. - -###### +Was the user whom received the account notified instantly? - -###### +Did the student update the terminal interface? - -###### +Is the password saved in the file `"users.txt"` encrypted? - -###### +Did the student make their own Makefile? - -###### +Did the student add more features to the project? - -###### +Did the student optimise the code already given? \ No newline at end of file From ff42a2c7f10a84f985e6ab446aea462537771f29 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 5 Feb 2021 16:14:05 +0000 Subject: [PATCH 42/42] renaming of source folder --- .../atm-management-system/{atm_system => atm-system}/Makefile | 0 .../{atm_system => atm-system}/data/records.txt | 0 .../{atm_system => atm-system}/data/users.txt | 0 .../atm-management-system/{atm_system => atm-system}/src/auth.c | 0 .../atm-management-system/{atm_system => atm-system}/src/header.h | 0 .../atm-management-system/{atm_system => atm-system}/src/main.c | 0 .../atm-management-system/{atm_system => atm-system}/src/system.c | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename subjects/atm-management-system/{atm_system => atm-system}/Makefile (100%) rename subjects/atm-management-system/{atm_system => atm-system}/data/records.txt (100%) rename subjects/atm-management-system/{atm_system => atm-system}/data/users.txt (100%) rename subjects/atm-management-system/{atm_system => atm-system}/src/auth.c (100%) rename subjects/atm-management-system/{atm_system => atm-system}/src/header.h (100%) rename subjects/atm-management-system/{atm_system => atm-system}/src/main.c (100%) rename subjects/atm-management-system/{atm_system => atm-system}/src/system.c (100%) diff --git a/subjects/atm-management-system/atm_system/Makefile b/subjects/atm-management-system/atm-system/Makefile similarity index 100% rename from subjects/atm-management-system/atm_system/Makefile rename to subjects/atm-management-system/atm-system/Makefile diff --git a/subjects/atm-management-system/atm_system/data/records.txt b/subjects/atm-management-system/atm-system/data/records.txt similarity index 100% rename from subjects/atm-management-system/atm_system/data/records.txt rename to subjects/atm-management-system/atm-system/data/records.txt diff --git a/subjects/atm-management-system/atm_system/data/users.txt b/subjects/atm-management-system/atm-system/data/users.txt similarity index 100% rename from subjects/atm-management-system/atm_system/data/users.txt rename to subjects/atm-management-system/atm-system/data/users.txt diff --git a/subjects/atm-management-system/atm_system/src/auth.c b/subjects/atm-management-system/atm-system/src/auth.c similarity index 100% rename from subjects/atm-management-system/atm_system/src/auth.c rename to subjects/atm-management-system/atm-system/src/auth.c diff --git a/subjects/atm-management-system/atm_system/src/header.h b/subjects/atm-management-system/atm-system/src/header.h similarity index 100% rename from subjects/atm-management-system/atm_system/src/header.h rename to subjects/atm-management-system/atm-system/src/header.h diff --git a/subjects/atm-management-system/atm_system/src/main.c b/subjects/atm-management-system/atm-system/src/main.c similarity index 100% rename from subjects/atm-management-system/atm_system/src/main.c rename to subjects/atm-management-system/atm-system/src/main.c diff --git a/subjects/atm-management-system/atm_system/src/system.c b/subjects/atm-management-system/atm-system/src/system.c similarity index 100% rename from subjects/atm-management-system/atm_system/src/system.c rename to subjects/atm-management-system/atm-system/src/system.c