GithubHelp home page GithubHelp logo

csharp_practical_11ab's Introduction

CSharp Practical

This repository belongs to: YOUR_NAME_HERE

This repository contains the challenges that accompany the C# course at VIVES University of Applied Sciences at Bruges which can be found at http://base-to-ace.netlify.com.

Each chapter contains a number of challenges. Some may come with solutions other may not. Most of them are accompanied by Unit Tests.

All challenges contain at least a README.md describing the task at hand. Most already contain a Visual Studio solution to start from.

Starting as a Student

To get started you will first need to get a copy of this repository. Follow the steps below to get your own personal copy. This only needs to be done once.

  1. Get the GitHub classroom invitation link from Toledo.
  2. The first time you will need to allow GitHub Classroom access to your GitHub account. Click the Authorize github button.

Authorize GitHub Classroom

  1. Make sure to select your name from the roster. If your name is not present yet then you can click the Skip to the next step for now. But please inform your teacher in that case.

Select name from Roster

  1. Now you can accept the assignment and wait for your own personal copy to be created (can take up to several minutes - please be patient)

  2. Open the GitHub page of your repository

  3. Copy the ssh clone-url (green button) that looks like [email protected]:vives-intro-to-programming-2022-2023/csharp-practical-<username>.git

  4. Traverse to a local directory on your system where you wish to clone the repo using Windows Explorer. Open PowerShell in that location by holding down Shift and right clicking the directory. Next select Open PowerShell window here from the context menu.

    Please don't choose a destination directory that is nested very deeply. The structure of this repo introduces quite a lot of subdirectories and might give problems towards maximum path length in Windows.

    Opening PowerShell in directory

  5. Issue the git clone command followed by the url you copied (right click or Ctrl + V to paste).

git clone <place-ssh-url-here>

You should get a similar output:

Cloning into 'csharp-practical-NicoDeWitte'...
Warning: Permanently added the RSA host key for IP address '140.82.121.4' to the list of known hosts.
remote: Enumerating objects: 1241, done.
remote: Counting objects: 100% (1241/1241), done.
remote: Compressing objects: 100% (625/625), done.
remote: Total 1241 (delta 546), reused 1241 (delta 546), pack-reused 0
Receiving objects: 100% (1241/1241), 602.71 KiB | 1.77 MiB/s, done.
Resolving deltas: 100% (546/546), done.

Now you should have your local copy of the repository.

All git commands in other sections should always be executed inside of the project dir called csharp-practical-<username>.

Committing Changes

Changes can be committed and pushed back to GitHub using the terminal.

Traverse to your local csharp-practical-<username> directory and open a PowerShell window by holding down Shift and right clicking the directory. Next select Open PowerShell window here from the context menu, as done previously in section Starting as a Student.

  1. Add all changed files using the command: git add .

  2. Commit the files and add a message: git commit -m "My message goes here"

  3. Push your changes to GitHub: git push origin master

    Committing and pushing via PowerShell

  4. To make sure all is well, you can always issue the command git status, even in between other commands.

You can also navigate to your GitHub page of this repo and check if all went well.

Make it a habit of committing and pushing regularly. At least after solving each assignment.

Also checkout the shortened version of these steps for everyday use.

Pulling the Latest Updates

To pull the latest updates you will first need to add the original repo on which this one was based. This only needs to be done once for every cloned instance:

git remote add base [email protected]:vives-intro-to-programming-2022-2023/csharp-practical.git

base is the name of remote repo. Now you should see two remotes when issuing the command git remote -v. For example:

base     [email protected]:vives-intro-to-programming-2022-2023/csharp-practical.git (fetch)
base     [email protected]:vives-intro-to-programming-2022-2023/csharp-practical.git (push)
origin  [email protected]:vives-intro-to-programming-2022-2023/csharp-practical-NicoDeWitte.git (fetch)
origin  [email protected]:vives-intro-to-programming-2022-2023/csharp-practical-NicoDeWitte.git (push)

Now every time you wish to pull updates you need to follow these steps:

  1. First make sure that you have no local changes. This can be seen by executing git status. It should state nothing to commit, working tree clean. If not, you first need to add and commit the changes (see section Committing Changes).
  2. Now issue the command git pull base master --allow-unrelated-histories to pull the latest changes.

Pulling Changes

Make sure you have no conflicts before committing everything.

Also checkout the shortened version of these steps for everyday use.

Overview

Please indicate which challenges you have finished by placing a โœ”๏ธ emoji in the finished column. These were found at https://emojipedia.org.

xUnit Tests

Unit Tests allow code to be tested automatically for correctness.

Some challenges might be accompanied by these tests (๐Ÿ‘ in Unit Tests? column).

Open the Test Explorer overview in Visual Studio by navigating to Test => Windows => Test Explorer.

Hit the first green arrow at the top left (Run All):

Run All Tests

Normally the tests will always fail in the beginning.

Failing Tests

If the challenge is solved correctly, all tests should pass.

Succeeding Tests

xUnit Framework not Found

If you get an error stating the the xUnit Framework cannot be found, you should check the NuGet package manager sources.

Traverse to Tools => NuGet Package Manager => Package Manager Settings. Next select the Package Sources entry as option (left side). It should contain the nuget.org package source as shown in the next screenshot:

nuget.org source

If it does not exists, add it with the following settings:

  • Name: nuget.org
  • Source: https://api.nuget.org/v3/index.json

You may need to restart Visual Studio.

Introduction to Programming

Chapter 01 - Introduction to Computer Programming

Finished Challenge Difficulty Description
โŒ Making a Sandwich Easy Document the process of making a ham and cheese sandwich.
โŒ Programming Languages Medium Search the Internet for some programming languages.
โŒ Processor Architecture Medium Search the Internet for the meaning of a processor architecture.
โŒ Biggest Number in a List Hard Document the process of finding the biggest number in a list.

Chapter 02 - Basic Building Blocks

Finished Challenge Difficulty Description
โŒ BMI Adult Check Easy Check if user is an adult when calculating the BMI
โŒ Personalized BMI Easy Personalize the BMI example with the users name
โŒ Smartphones Easy Determine the properties of Smartphones
โŒ Cinema Easy Determine the properties of a cinema screening
โŒ Circle Circumference Medium Determine the circumference of a circle
โŒ Rectangle Area Medium Determine the area of a rectangle
โŒ Motorcycles Medium Determine the properties of Motorcycles
โŒ Student Grader Medium Output message to user based on his grade
โŒ Sum of Numbers Hard Determine the sum of a list of numbers

Chapter 03 - Starting in C#

Finished Challenge Difficulty Description Unit Tests?
โŒ Hello World Easy Print a Hello World message โŒ
โŒ Java Programmer Easy Fix mistake of a Java programmer โŒ
โŒ Basic Syntax Error Easy Find and fix a small syntax error โŒ
โŒ Developed By Easy Print message and your name โŒ
โŒ My First App Medium Create a new VS Project โŒ
โŒ Need a Break Medium Find and fix two small syntax errors โŒ
โŒ Personal Details Medium Print out personal details โŒ

Chapter 04 - Storing Data

Finished Challenge Difficulty Description Unit Tests?
โŒ C# Land Easy Initialize minimum required height variable ๐Ÿ‘
โŒ Frame Delimiter Medium Initialize start and end of frame delimiter ๐Ÿ‘
โŒ Marco Polo Medium Output some personal details about Marco Polo ๐Ÿ‘
โŒ Programming Bugs Hard Output authored message of the day ๐Ÿ‘

Chapter 05 - Processing Data

Finished Challenge Difficulty Description Unit Tests?
โŒ Rectangle Properties Easy Calculate area and circumference of a rectangle ๐Ÿ‘
โŒ Pythagoras Easy Implement the Pythagorean theorem ๐Ÿ‘
โŒ Fundamental Calculus Easy Model a calculator ๐Ÿ‘
โŒ Pizza Time Medium Divide pizzas among people ๐Ÿ‘
โŒ Evaluation Medium Determine final score of course ๐Ÿ‘
โŒ Calculating VAT Medium Calculate taxes on a net value ๐Ÿ‘
โŒ Circle Properties Hard Show properties of a circle โŒ

Chapter 06 - Getting User Data

Finished Challenge Difficulty Description Unit Tests?
โŒ Student ID Medium Generate student email and ID ๐Ÿ‘
โŒ Far From Home Medium Calculate fuel usage for a trip โŒ
โŒ Time Machine Hard Add hours and minutes to clock ๐Ÿ‘

Chapter 07 - Methods

Finished Challenge Difficulty Description Unit Tests?
โŒ Hail C Sharp Easy Call a method that outputs statements โŒ
โŒ Sum and Difference Easy Call and create methods for Addition and Subtraction โŒ
โŒ Hello Mister Roboto Easy Create a method that outputs a greeting โŒ
โŒ Toss a Die to Your Witcher Easy Call die throwing method and store result โŒ
โŒ La Resistance Medium Solve resistor networks โŒ
โŒ Its all About Timing Hard Converts seconds to Timestamp โŒ

Chapter 08 - Making Decisions

Finished Challenge Difficulty Description Unit Tests?
โŒ Rectangle Area Easy Determine area of rectangle ๐Ÿ‘
โŒ Coordinate Plane Easy Determine quadrant of a point in 2D space ๐Ÿ‘
โŒ LED Series Resistor Easy Determine the series resistor of an LED ๐Ÿ‘
โŒ Baby Roulette Medium Build a guessing game โŒ
โŒ Square Roots Medium Determine square roots of integer numbers โŒ
โŒ Drifting Years Medium Check if given year is a leap year ๐Ÿ‘
โŒ Biggest Number Medium Biggest number out of 3 ๐Ÿ‘
โŒ ConverterNator Hard Menu Choice of Imperial versus Metric conversions ๐Ÿ‘
โŒ Number Properties Hard Determine the properties of two numbers โŒ

Chapter 09 - Loops

Finished Challenge Difficulty Description Unit Tests?
โŒ Up and Down Medium Generate series using for-loops โŒ
โŒ Roll Em All Medium Throwing Dice โŒ
โŒ Start to End Medium Summing Series ๐Ÿ‘
โŒ Fibonacci Sequence Medium Generate the Fibonacci sequence โŒ
โŒ Higher / Lower Medium Build a higher /lower guessing game โŒ
โŒ Greatest Common Factor Medium Brute-force the gcf of two numbers ๐Ÿ‘
โŒ AppleCake Medium AppleCake word game ๐Ÿ‘
โŒ Series of Squares Medium Check for formula for a series of squares ๐Ÿ‘
โŒ Number Manipulator Medium Manipulate numbers digit by digit ๐Ÿ‘
โŒ Child's Play Hard Summation Game โŒ
โŒ Visual Rectangle Hard Drawing rectangle in the terminal โŒ

Chapter 10 - Strings

Finished Challenge Difficulty Description Unit Tests?
โŒ Reversal Easy Reverse the characters of a string ๐Ÿ‘
โŒ Binary Coding Easy Convert binary to decimal ๐Ÿ‘
โŒ Pattern Builder Easy Shape builder app for console โŒ
โŒ Text Properties Easy Analyze string for character classes ๐Ÿ‘
โŒ Holo Gram Easy Check if sentence contains all the letters of the alphabet ๐Ÿ‘
โŒ Parentheses Checker Medium Check line of code for matching parentheses ๐Ÿ‘
โŒ Palindrome Medium Determine if a word is a palindrome ๐Ÿ‘
โŒ Words Everywhere Medium Determine the number of words in a text ๐Ÿ‘
โŒ How Many Times Medium Find the number of occurrences of a word ๐Ÿ‘
โŒ Abbreviate This Medium Abbreviate words in a string ๐Ÿ‘
โŒ Not My Mail Medium Basic validation of email address ๐Ÿ‘
โŒ Binary Nibble Hard Binary representation of decimal value ๐Ÿ‘
โŒ Replace Performance Hard Replace substring in text ๐Ÿ‘

Chapter 11 - Arrays

Finished Challenge Difficulty Description Unit Tests?
โŒ Multiples of Three Easy Generate array with multiples of three ๐Ÿ‘
โŒ The Sum of All Numbers Easy Calculate sum of array of integers ๐Ÿ‘
โŒ Absolute Sum Easy Calculate sum of array of absolute values ๐Ÿ‘
โŒ Parallel Arrays Medium Working with multiple arrays ๐Ÿ‘
โŒ String to Numbers Medium Convert array of strings to array of integers ๐Ÿ‘
โŒ Join the Resistance Medium A resistor color band converter โŒ
โŒ Turn the Tables Medium Multiply arrays with each other ๐Ÿ‘
โŒ Biggest of them All Medium Determine the biggest number in an array ๐Ÿ‘
โŒ Time for Change Hard A vending machine simulator โŒ

Chapter 23 - Creating and Using Objects

Finished Challenge Difficulty Description Unit Tests?
โŒ Point in Space Medium Create class of 2D Point ๐Ÿ‘
โŒ Round About Medium Create a class for a Circle ๐Ÿ‘

Chapter 24 - Defining Custom Classes

Finished Challenge Difficulty Description Unit Tests?
โŒ Teach the Teacher Medium Store personal details of teacher ๐Ÿ‘
โŒ Kings of Nothing Medium Implement a player class for a game ๐Ÿ‘
โŒ The Paint Factory Medium Calculate how much paint is required for complex surfaces ๐Ÿ‘

Chapter 25 - Getters, Setters and Properties

Finished Challenge Difficulty Description Unit Tests?
โŒ Super String Theory Medium Add properties and implement string methods ๐Ÿ‘
โŒ Third Rock from the Sun Hard Calculate properties of the Earth (sphere) ๐Ÿ‘

Chapter 26 - Constructors

Finished Challenge Difficulty Description Unit Tests?
โŒ I Can Hear Colors Easy Refactor the Color class with properties and constructors ๐Ÿ‘
โŒ Back to the Future Medium Create a TimeStamp class ๐Ÿ‘
โŒ Vector from Start to End Medium Create vectors and calculate resulting total vector ๐Ÿ‘
โŒ Quadratic Medium Solve a quadratic equation โŒ
โŒ Things are Complex Hard Math with Complex numbers ๐Ÿ‘

Chapter 28 - Interfaces

Finished Challenge Difficulty Description Unit Tests?
โŒ Generator of Numbers Medium Create an interface for number generators โŒ
โŒ Total Surface Medium Fix tightly coupled classes โŒ

Chapter 50 - Introduction to WPF

Finished Challenge Difficulty Description Unit Tests?
โŒ Count Me Up Scotty Medium Create a WPF App for Count Me Up Scotty โŒ
โŒ Complex Calculator Medium Create a WPF App for Things Are Complex โŒ
โŒ Hangman Refactored Medium Refactor the hangman game to a library and create a GUI โŒ

csharp_practical_11ab's People

Contributors

bioboost avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.