Visual Studio: Your Guide to Basic C# OOP Programming | Matthew Dewey | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Visual Studio: Your Guide to Basic C# OOP Programming

teacher avatar Matthew Dewey, Writer, Writing Tutor

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

10 Lessons (58m)
    • 1. Introduction | Visual Studio: Your Guide to Basic C# OOP Programming

    • 2. Classes Introduction

    • 3. Class Creation

    • 4. Methods Introduction

    • 5. Void Method Practice

    • 6. Typed Method Practice

    • 7. OOP Practice

    • 8. Project Discussion

    • 9. Project Answer

    • 10. Conclusion to Visual Studio: Your Guide to Basic C# OOP Programming

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Welcome to my OOP course on C# Programming with Visual Studio!

Before discussing the course I must emphasize that this is an Advanced course, so fundamental knowledge of C# and/or Visual Studio is required. If you would like to learn these fundamentals then please take a look at my beginner course, Visual Studio | The Basic C# Programming Course.


My name is Matthew Dewey. I am an experienced programmer, having received several accommodations on programming in my formal education as well as tough several programming languages to thousands of students. My goal is to provide you, the budding programmer, the knowledge you need on programming in an easy and fun manner. In this course I do just that and with one of the most useful IDEs coupled with the C# programming language.

C#, a wonderfully simple programming language that has encouraged many programmers to pursue careers involving C# over any other language. Of course, it goes without saying that C# is an excellent language, but do you know what is required of you in a programming career?

There are many skills in programming that are required in any form of the field, but what I plan to teach you in this course is exactly what you will find on many job requirements as well as many advanced methods that will no doubt help you in the future. I speak of OOP, Object Orientated Programming, in addition, I included data processing.

What about Visual Studio? A popular, widely used IDE that many large applications have been created over the years. Do you know how to use it to its full potential? Well, in this course we will go through several projects that will help you get truly comfortable with the IDE as well as more adept at program creation.

In short, you will learn:

  • Advanced C# Methods
  • Data Collection
  • Data Processing
  • OOP, Object Orientated Programming
  • and BONUS tips and tricks!

Go no further if you're looking for the course that will take you from a novice to an expert! With my course, I can guarantee that the knowledge you learn will help you in your career or further studies on Java programming. I hope you enjoy the course and it helps you on your way into the world of programming!

"Programming is a form of art. It is logical creativity!"

Meet Your Teacher

Teacher Profile Image

Matthew Dewey

Writer, Writing Tutor


Hey everyone!
This week on Writing Today, I cover a step-by-step formula for writing an unforgettable villain. If you want an antagonist that really stands out among the many bland villains in literature today, then you don't want to miss this!


I have been writing and teaching for years, helping tens-of-thousands of students achieve their goals, be it completing their novels or publishing their work. Having written several novels, non-fiction books, hundreds of short stories and articles, I have studied and put into practice the best methods for writing effectively and efficiently.

In addition to writing, I am also a programmer and artist, teaching what I know on the subject and helping those interested get a he... See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction | Visual Studio: Your Guide to Basic C# OOP Programming: Hello and welcome to your OPC shop course with visual studio. My name is Matthew Dewey. I have studied programming for several years learning civil programming languages throughout my Korea. Having tour thousands of students over these years, I have discovered how much the new age of program is struggled to understand the fundamentals of programming, not to mention the advanced concepts. It is Maar goal as a programming instructor to provide you with a simple and practical way to learn programming not from rotting on paper or practicing theory, but barcoding and creating programs, programs that have a use and contain code that will no doubt help you throughout your career to not only create programs but to make them efficient and well written. In this course, we talk about classes and methods the fundamentals off Opie object orientated programming. Before I could discuss what this course contains and what you'll be learning to do, I must warn that some beginner knowledge is required. You'll need to have visual studio, the I D that will be working with and the fundamental knowledge off See shop. You must know how to create civil variable tops. Use loops if statements and retrieve, Use a daughter or daughter processing if you're confident that you have these skills than allow me to continue. If not, then a recommend taking mom Beginning calls Visual studio, the basic See shop programming course you'll learn all you need to know and the foundations of seashell programming in that ghost. Now what will you learn in this course? You will be learning what classes are and what are used to on how to create them. You learn how to create these classes. You will learn how these classes link. And with this in mind, save yourself code by creating and O P program, you will then learn about method creation, the different types of methods and how to make them work. Well, with just about any piece of daughter that needs to be processed, Al present you with the programming to which you could practice as we go. And I do recommend practicing as you go as this will no doubt help you not only in this course but in the future. In building your programming prowess, there will be a project at the end of this course where our ask you to create and rop program that meets certain specifications to carry out a simple task, of course, present these lessons and project in the simplest way to prevent any polls or struggle. By the end of this course, you will have the foundation and a few more tips on object orientated programming when working with C Sharp. I hope this course in large in this year on the subject and you move forward into the world off programming. Thank you, and I'll see you in the next video. 2. Classes Introduction: Hello and welcome to your earpiece. Eash, of course, was visual studio. In this video, we'll be discussing what classes are and what they are useful. First, you know, there is a main program in which you write your code. The execute Herbal program will been run this code using the methods and variables you called and created. This main program is shown by the salon opening this section which he Raj occurred. Static void main. This is the cool of your program, the main execute herbal section. If there is no good in this particular program, then your program will produce nothing but a large stating that the program is run successfully. What we're gonna do is create similar sections of code, but thes sections will not be executed ble. These sections are called classes. These classes then contain methods which we'll discuss in a later video. The classes containing these methods will be called by the main program the static void main section of the code. By creating objects, these objects will make use of the methods inside the claws. How classes are linked is by a simple hierarchy. The class contained inside the main programmes project can be used by the main program as long as the class is contained in the package that the main method can locate this close in if an object or line of code is called, as long as the class is contained in this package, the main method can locate this close using an object or line of code. It is a fairly simple process that you don't need to worry about too much. Organizing your classes is important if you depend upon certain code to keep this in mind when working with objects. What you may know already is that you've been using classes since the start off programming . Except these classes. I'm not contained in the main program. These have bean imported to the program via the I. D. E s default settings. You could find these imported classes written at the top of your code in the main program. Now there are two places where you can create your class. You can create it in the main program. Although this isn't always recommended when working with smaller Opie programs, the more common way is by creating an additional C sharp class in the same project. This can be easily done by adding an atom a c sharp glass. After I clicking on the Project folder, I'll be showing you how in the next video by creating a practice class, which will be working with throughout this course. Once you have created this glass, you'll notice later on that it does not need to be imported when creating an object and calling upon its methods. This is because, like if we were to create a close inside the main program or just within the project, the class is local to this main program. Unlock the classes, which are imported by default or by the programmer. Those classes are pre made within the I D E and need to be imported to make use of their code. So to summarize what classes are, there are sections of code containing methods that can early be executed through an object in the main execute herbal class. If you still struggle to understand how the system works, you'll get a better idea in the next video that concludes this. Listen. In the next video, we'll create a practice project and a class to go with it 3. Class Creation: Hello and welcome to your own OPC shop course with visual studio. In this video, I'm gonna show you how to create a class in two ways. As you can see, I have the program Microsoft Visual Studio Open. What were you going to do is create a project in which we're gonna be working throughout this course we have a file new project. You notice there'll be a visual C drop down box. We click on Windows Classic Desktop Council application dot net framework and we name our project for this one. We're just gonna call it Opie practice, So it's double o p p practice and click. OK, now, as you can see, we have our main program where the name space, the close program and the static void main, which will contain our executable code. Now, to better understand what classes we can take a look at our execute herbal main code. We have the class program, the main class and our main program. And inside the close, we have our main makes it the static void main May said whatever you rot inside, this main clause is going to be executed. So if we want to create a class that's not execute herbal, in other words, to create a class which we can call upon objects from. We have to make sure it is out of this class program, and this is easily done. The first way in which I'm going to show you how to create a class is inside the main program itself. We're here to the end of class, the end brackets of it. We start a new line and we create a new class by topping in public class, and we give up across the name, such as a writer. Now that we have done that, we open up our section for close, in which we will have our code. What we have now created is a close, and we know it's a class from the name as well as if we attempt to output something through the class itself, it will throw an era. For example, we have a simple up Portland consul dot right line double quotations have love closed in the semi colon is a simple LAN, which, when run in the main method, will put the land hello in the council. However, in the clause, it does not This is because the main code needs to be contained within a method. So if we were to create amazing inside this close, this land would run but only once called upon. In the main method, you need to keep this in mind or code within an outside method that isn't the main method will not be executed unless was the main methods say so. The second way in which you can create a close inside your program is by going to the solution. Explorer, right, clicking on the hour p practice, clicking Add new Artem and what we wanna add is a class within click add. We can name this class, but for now I'm just leaving it as close as you could see. It is not a main clause, and we can call upon it by creating an object in Santa Main program. So let's practice creating an object. Now you're back Charlemagne program. And now let's just start our first close, which we created inside the main program to create an object we top in the name of the class recalling writer we gave her object to name such as Taste equals new writer, a set of brackets close with the same me colonel. And just like that, we've called upon a class. We can then use its methods by top it in the name of the object dot and a method that falls under the class. As of right now, there are no methods under the right to close, so there's no point in creating an object. However, all of this is just a test to see if our classes are being created properly. Now let's try creating an object for a class one costs. It's a race Islam top in class one. Let's call it Taste equals new plus one. Close the senior Kerlan. And as you can see, there are no errors. Our Class one appears here and the Solutions Explorer just above our main program. So seeing as it is in the same project is locally found, and we can call upon it in our main method. And there you have it, how to create classes in C Shop Visual studio. These are the two ways in which you can create a cost in visual studio. The poor road method for Klaus creation is by creating a close by adding it to the project instead of having it in the main program. So for now, I'm gonna delete the public class here, and I'm gonna delete class one as well. We'll recreate a class later. In the course when we learn about methods that concludes this lesson in the next video, we're going to be discussing topped methods. 4. Methods Introduction: Hello and welcome to your OPC shop course with visual studio. In this video, we are going to be discussing methods and their different tops. Methods are small programs that could be called upon by objects representing the methods. Respective Kloss, for example. I can create a meted that's simply print salon of text. I could then give it the name text printer created object in the main program for that class and then right in this land below the object creation object name dot tex printer, a set of brackets close with a semi colon. With this, a lot of Kurt. My main program will then look at the class that object name represents, find may 3rd and run the code within. Of course, this is only a basic concept off a method not to mention only one top. There are two types of methods that will be dealing with in this course void and topped methods. Void methods are methods that don't return any values. Top two methods do. For example, a top method can be used to give value to a variable. It will look something like the land as follows. We have a string variable called name equals object name. Don't mated. Name a set of brackets semicolon to end off the line. So what ever fairly that the method name returns will then be stored within the string. Variable name. This method would have to be a top string method to return a string value. This is what a string with it would look like. String method Name, they said. Brackets, We open up our section and we have a return line which contains the text. Hello. When creating a top method, you give the variable top. It is returning in this case a string the mason name and a set of brackets which will contain additional variables, which we'll talk about later. Inside the section below, I have created a return line, after which I've placed the text Hello in double quotations. What this will induce. Return the string value off hello. Place it in a string variable that the method was a san to This is the most basic off top methods. Now let's look at void methods. Avoid methods. Do not return any values. They four. They don't have a daughter. Top sitting decoration or even a return on avoid method can look as follows. Avoid method Name Is it a brackets? We didn't open up a for sectional code, and inside you have written an example line, which isn't even necessary. Council. Don't rattle on a set of brackets. Hello, closed the semi colon. If this method were to run, it would simply print alan. Hello Now avoid May. That doesn't need to have any code within it to run. Unlike the top method, which requires a return LEM, the void method returns void, which means the Kurt and avoid. Method is primarily used for daughter processing, value finding or other larger tasks. More top methods are usually containing far less code, seen as they used only to return values rather than process daughter. That sums up the core elements avoid and top methods. But what about those Additional variables are mentioned earlier. If you're method requires more daughter before writing its task, you can request it are stating additional very rules. In a set of brackets that follows the Method name, for example, we have void Mrs name and in South visit of brackets string would created in the section below, we have created a lan and as word equal Hello Commerce space Plus would and then we print out the valley. Would we have avoid method modifying a string called Would The Valley for this very bone is given in the main program. When the respective object makes use off the method, it would look as follows Object name dot method, name, a set of brackets and inside we have the text John, seen as the void admitted Method name requires the string variable top. And so that's what we have had done. We have now stored a value within that variable. The value being John Limited will then process the doctor, which can be outfitted with the council, as shown previously, all returned using a top two mated. Of course you missed. Its can contain more than one variable if needed by simply separating the different variables with commerce, which could look as follows. Yeah, we have a void. Miss it in a class inside the set of brackets we have string would comma into age, and we have adjusted. The lan would equals to suit those two variables would plus is plus age plus years old. And then we didn't print it out in the Consul in the main program. We give these values by topping in the object name dot Mattered name the set of brackets. We then have our string Valley John or shall go to the String Valley of Wood and comma 25 which will go to the invariable age. The final output off these will be John is 25 years old and there you have methods. They're different tops and how to create them. That concludes this lesson. In the next video, we'll practice using avoid methods. 5. Void Method Practice: Hello and welcome to your OPC shop course with visual studio in this. Listen, I'm gonna be showing you how to create FOID methods. First, let us create a project which we're gonna be working with topped and void methods. In this course, we got a file, new project Windows Classic Desktop council application. And let's call this one method practice What we have created our main program. Let's create a class which we're gonna contain our methods in. We're too are mated practice inside the solution Explorer. We go to add new Artem and we had a c shop class. We're going to call this class the writer close and we click. Add as you could see in the solution Explorer, We have the right across here and we can edit the code of here. Now that we've created are close, let's get straight into creating a void method to create of method. We first have to make sure it's public so that we can be received by the main program so public and says it's avoid mated, avoid, and we give it the name age. Check to check the age since we're gonna be working of two tops variables will be having a string name for the name variable. And we're gonna have an intern from age with an open up our code section with a set of brackets. Then we go straight into occurred with an if statement that checks to see if the age is above 18 and inclusive. So it's if age is greater than equal to 18. I'm not section of code. We're gonna didn't use the council to rot, and we're gonna have it rot name plus double quotations is admitted. Close the same economy within haven't else if the ages below 18 17 and lower another council doctor, right? I don name plus Democrat stations is not admitted Close the same income now that we've created are void message, rigor to up main program and created object for the respective close to create the object treetop in the name of the class, I would give the object of names such as test equals new and again the name of the class with a set of brackets close to the same occurred on. Now let's use our method test dot age chick and we give it a string value off Joe Blog's and an age of 25 close with the semi Kotal. And since it's avoid message and it has the council right lands within its code or we need to do is run out program. So control Fath. And as you could see, our program is working correctly ages above 18. So Joe Blog's is admitted, and that's what it prints. Now let's close and test our program with another top daughter such as 18. Joe is still admitted and now finally below for 17 throughout our program. Joe Blog's is not admitted. So now we have working program. We have a method which does all the work. We have an object that makes you so that method country of here is the simplest form, often object orientated program using avoid miss it that concludes this. Listen. In the next video, we'll practice using a tap method 6. Typed Method Practice: hello and welcome to you. 00 P. C sharp course with visual studio. In this video, I'm gonna be showing the Arctic rate and use topped methods. In the previous video, we practice using void methods. In the mythic practice program, Katrina do is use the same program, removes, avoid methods and work from scratch. So I'm here in the main program and I'm gonna delete the two lines of code we wrote in the previous video. What we're gonna do in this close is reused the void with that age chick hand in hand with the top two method, the tap method will return. The final result hard for turned funnel resulted in a variable that we're gonna create that represents the entire class. So we have the class rata. But we're going to do after the class writer is create a variable. We're going to call this variable string results and we're going to give it a valley off this double quotations. It's therefore a mill value. And now we're gonna just avoid method to change the results value to what is written in the council. Right? Lance sensitive Consul Rockland, named plus double quotations, is admitted So instead of just the council right land, we're gonna have the result equal what's inside The cultural plot such a relentless to raise the alarm have result equal what is inside and the same for the else Reraise Alon result equals your notice result is still being registered as a variable inside the method . This is because it's outside and before the method. If we're gonna work with variables that are the background, we are to create them at the very top of the cross so that we all methods below have access to them. As you can see now in this void method and now we're gonna create the top mated, which is simply just return the result. Our top message will be public string and we call it final result said brackets will open up our coding section and we top in return result close to the same me colonel. And that is a top to Nathan. It has the daughter top string and it's returning a string. If our to attempt to return an integer, it would just show an era as we've stated in the previous videos. Now let us go to back to the main program creates an object writer taste equals new writer . We're then gonna use the void. Mace, that age tick test dot age. Check off the values, John. And 25 again because the semi colon and then we're going to create a council right line in the main program console dot right and then saw the briquettes. We're gonna have test dot funnel result close to the semi colon. What this should then do is take the valleys John and 25 working through the age check method the h checkmated within, adjust the string. Result accordingly. As we've noted in the previous video, it will change. The result to name plus is admitted have like string fund result. Our top two method will then return the string variable to the main program. And what we're gonna do if this variables printed out in a consul Radler So let's taste on our program now about Cristian control. If, as you could see, it has printed, John is admitted in the council. So our programme is successful. We've not only learned how to create a top method, but we've also used it with a void method is was taken advantage off local very rules such a string result. At the same time, we can create civil methods that take advantage off the string result as well, and not just return it like I'll top 2 May said. For example, we can create larger and more complex starter using their daughter that we've created in the result variable and like we've done with final result, we can create a top committed that returns it if you take a look at our class. We have two methods and several lines of code, however, and our main program, called Barcode, is only three lands. This is the goal of object orientated programming is to have our programs work hand in hand with several objects. We can go through several pieces of daughter not needing a loop, just an object. And with one land we can run Kurd that we've previously created, as you can see in the void method we needed dropped another. If statement, we can simply use the object with different values and the same goes for the test dot final result method. We're creating an efficient program and saving ourselves lines of code that concludes this lesson. In the next video, we'll practice object orientated programming 7. OOP Practice: Hello and welcome to your earpiece. E shop course with visual studio in this. Listen, we're gonna practice object orientated programming In the previous videos, we learned how to create and use topped and void methods. We're going to create a close with three methods. All these methods will work together to receive process and output. Daughter, if all goes correctly, our main programmes core code will only have four lands, while our secondary class will have several encompassing the programs features. First, let us create our project. We go to file new Project Windows Classic Desktop Council application dot net framework and we're going to cool. I'll application Object practice once we have done that well, now create our sub close which will contain all of our methods. Right. Click on object practice. Go to add new Autumn, we select visual C sharp class and we're gonna call this close the process class and click add. Once we have done that, you'll see them in the Solution Explorer program being on the program and process being our close. Now let's discuss what the program will be doing in depth. What we're gonna do is ask the user to entin three pieces of daughter, their first name, last name and her age. That is the job off. The first method will be creating to receive the daughter. The second method will be processing the doctor, taking the variables and the values we have stored in them and processing them to suit a output that we desire. And finally, the third method will be a string topped method which will return the result which will be supported in the main program. First, let us create a variables that we're gonna restoring the valleys in. Let us create a string and cool it name. We gave it double quotations. So that's why it's so has a value. We then create another string for last name, which will call L name equals double quotations again and finally an ent for age which will give the value off zero close with cynical. Now that we've done that, we can move straight onto our first method. Our first method will be avoid method since it is not returning any values. So let's make it public avoid and we will give it the Mason name off Retrieve. Since it is retrieving data, we have all said two brackets and then we open up our section of code. Inside, this method will have several right lands and read lands. First, we'll have a Rod Land council dot right line off the message. Enter your first name close of the semi colon, and then we'll give our string variable the name. Variable the value by using the council dot reid Land. I said to brackets close with semi colon, and we'll do the same for the last name and age but processing the input to an integer to store into the age variable, as well as adjusting the messages to suit the daughter that were retrieving so council dot right line double quotations. Enter your lost name Semi colon l Name equals console dot reid. Line constantly right line again, This time in tow, you'll H and we convert the string into interject by going age equals convert 0.2 int 32. Open up up brackets consul dot reid Line close to the sea me colonel, and that is our first method. Next real creates the method which will process the daughter public. Boyd and we nickel this one processing a state of brackets and our section two into the coating. Do you done that? Let's decide on what we processing the daughters, too. Since we have age we're gonna take from what we did in our previous programs and check to see if the ages above, so to number, let's say, 20. If the age is above not inclusive of 20 then they are admitted into the program and we're gonna take advantage of the first name and last name 200.2 tops by mentioning the last name and then the first name separated by a comma. The more formal way of listing names, which essentially is what our program is going to be doing. So let's create an if statement if age is greater than 20. Since it's not inclusive, we won't include the equals. We now need a variable to into the result in So let's go to the top. We create a string variable which we will call result and again equals double quotations. We go back to our if statement and we change results value to the following message result equals l name class come in space plus name. First double quotations is allowed in the program close with Semi Conan within creating else. We copy that unchanged. The message is not allowed in the program, and that concludes our sick and method. We now create a top method which will return the final result public string. And it's this court result and it has one line return result close to the scenic on there. We have three objects. We go back Tom Main program. That's great an object and make use of them. First we call the class process we call the object. Test for now equals new process within used the methods Test dot Retreat, I said to brackets close with cynical on this will retrieve the daughter. We then process it and finally we put the Result Council not right line. Asset records test dot result. Another set of records close the Simic on. Now that we've done that, let's run out program control if we are presented with the consul asking us to intern our first name and under school flashing to indicate that we are allowed to Indiana value, Let's entering John and then asks us to enter in the last name. So our first meeting is working correctly. So far. Blog's and let's intern age above 20 such as 25. Blog's John is allowed in the program. It's simple is that let's run the program again with the same daughter, except this time we were just the age to 20 is not allowed in the program, which is correct, since we have not made it inclusive of 20. And of course, anything else below 21 will have the same result, and they have an object orientated programming. But before this listen ins, I'm gonna show you a simple A way to save yourself some code. Yes, we have our program set to different methods that we can reuse in any order. And however many times we want saving results for lost if we would like only but simply adjusting the process incurred. However, let's save ourselves some lands in the main program in a not so inefficient way. But it is a very useful tip to remember for later programming the methods that we have now created. Insiders class can be used within the class itself without an object. So first, let me show you how, by going back to our main program and deleting these two lands over a year, what we're gonna do then, is make use of their trees and process United's inside the result method. Always simply need Do this top in the name off the method. Receive a set of brackets close with semi Colon. All we need to do is topping the name off our method, such as retrieve a set of brackets close of the semi colon. Let's do the same for processing, and now let's go back to our main program and run it control. If you know that's the program runs the same way. Even though the core of our main program is only two lines, No so Joe Bugs 25. The program works the same way. So with this information in mind, you can create an object orientated programming that links the objects to each other. You can have the retreat inside the processing, so the moment to user decides to process some daughter they can immediately entering the dot and have it processed within one line, and then the final line would be just the output, or you can leave it all to the final output. This is, of course, working on this program itself. If you were to create a more complex program. In future of several methods, not just three. You have able to keep these links in mount, creating a more complex and sometimes more efficient program that concludes this lesson. In the next video, we'll be discussing the project for this course. 8. Project Discussion: Hello and welcome to your OPC Sharp course with visual studio. In this video, we'll be discussing the project for this course. For this project, you're to create a program called Ticket. The program makes use off two additional classes to that of the main program. The first class will be called process and contained the core off oil methods and code the first method with the name of your own. We'll ask the user to enter in a name and age, which will be stored in variables. The second myth it would your US A. Name will process this name and age. If the age is below 18 not inclusive. The name will be printed with an upper place X following it. If the age is 18 or higher, the user will be asked to enter in the last name and gender him. Or if, if the genders m, the program will process a result which will be stored into the result variable. The result will be a string with the message Mr. And the last name is allowed into the program. For example, the user interest in Joe and 28. The user then enters in blog's and M seen as 28 is higher than 18. The program will then place the LAN Mr Blog's is allowed into the program into the result. Variable if the ginger is if for female miss is printed instead of Mr the third method will be a string top two method, which returns the result variable that concludes the first class. The second class will be called receptionist. It will contain one method and ask the user to enter how many applicants there are the Smith. It will be called the ticket print method, and it'll make use of the process class by creating its own object ticket. Print will be avoid miss it and simply add the results to result variable of its own, which will be printed in the console. At the end of the method, the main program should contain only to lands one. Creating the receptionist object and the sick and using its one and only method that concludes. This discussion on this course is Project. In the next video, I'll give you my answer 9. Project Answer: Hello and welcome to your OPC shop course with visual studio. In this video, I'll be giving him. Our answer to this course is Project. First. Let us create our project. We go to file new project winners classic desktop Con supplication, Open Records, dotnet framework and, as prescribed in a discussion, will be calling our program ticket. Click. OK, now that we have created our program, let's create the two classes that will be using first we right click on ticket in the Solution Explorer. We click add. We click new Artem A C shop costs and we'll call it process, which will contain the core of our code within. Add our next close, which will be receptionist now that you've created our classes. Let's go to process and raw at the core of our code. First, let's create the variables that will be using in this class. We'll create a string variable to contain the first name, which will go if name equals double quotations within. Create a string. Very water contained the last name, so it's l name equals reputations. We then have a string variable which will contain the result. And finally, we haven't interject which will contain the age. Now that we've done that, let's create our first void message. Let's make it public Boyd. And it asks us to intend values services for call this the receive method. I said brackets and we open up our section of code now to done that, let's ask the user to enter in the values. So that's constant. So let's ask the user to enter in the first name First. We first have a consul dot right Ron to display a message in tow. First name. Because the cynical within creator lan, which places a value inside the first name of the council Dutch read love that will get us our first name. We now creates another one council dot right I don in tow age close to the Syrian column. We didn't have a judge equals Convert Dutch, too. Int 32. Open a set of bracket console dot reid lan a set of brackets again close with semi colon, and that concludes our first method. Let's move on to our second method public avoid, which will be processing our results. Let's call this method Finn process way have our brackets and we create a section of code this process, May said. Well, first, check the age if age is greater than for equal to 18. Was that in MT. We now move on to the next part of our program, which we ask the user to enter in the last name and the gender. We will create a simple variable inside the if statement for the gender, but you can, of course, create an outer variable. I've moved out of the first name last name like we've done for the first name and the last name. But first, let's greater Council Dutch right plan double quotations enter last name because of the semi colon. We then have l name equals console, don't read land. We then create another message consul dot right Ron at asked the institute into Gender Kerlan M or Closer to see me Carl. But then create the variable string gender equals Consul don't read line. Now that we have those values, we create another if statement if gender equals equals devil quotations, uppercase M result equals double quotations, mr dot space us L name plus stubborn filtration space is allowed into the program close to the cynical on everything creates an else for the female. We copy their line, paste it, and instead of Mr we put miss and continue on their else we created else. If the age is below 18 said else, and we then have results equal if name, that's double quotation space and an upper case. X closes the semi colon and that concludes, often process method. And now we just need a tap to May 3rd, which returns the result. So that is public string. Ellis is. Call it Return Result way, have a brackets are section of curd, and we just simply top in return result a self explanatory mason. And that concludes our process class. We can then go to our receptionist class and create the one and only method tickets print in our ticket print class. We'll create an integer, which will be the interject which will contain the value of the user that the enter how many applicants they are applying to into the program. That's int num equals zero for now, within create omitted public, avoid a ticket print. Now you've done that. We asked the user to enter in the number of applicants, but first a council not right double petitions inter number of applicants close to the same economy. We then have number equals console I just read equals convert duck to into 32 open up records Consul dotted read blonde section of records Again, Every closer, the semi colon. Now that return that we create a full it for int I equals zero I is less than no I plus plus a section and in the section will create the process. Object process Temp equals new process within. Make use off the three methods Tim not receive those of the semi column temp dot finn process. And finally, we create a variable which will contain the final results. Or together, let's create that outside. The method said String Finn result equals double quotations. We didn't bring that back to here. We make Finn results equal. Then results plus double quotations backslash into started Newland plus temple not return result. And now that we've got all our results placed inside the result variable, let's print it, consul dot Right, I don Finn result close with the Simic off. We now got Charlemagne program. We create the receptionist object receptionist, just vehicles. New receptionist close to the semi colon were then used its one and only method test done. Ticket print double brackets. Closer the semi colon. Now we've done that. Let's run our program control. If it asks us to enter in the number of applicants. Let's Seyfarth. The 1st 2 will have ages below 18. The 2nd 2 will have ages above 18 male and female gender, and the fifth will also be above 18 and will be our Joe Blog's. So let's Intern a first name. Lucy, Age 14. Notice it doesn't ask us to print it in the last name. So it's trying. Rob, we also making 14 again. It doesn't ask us to enter in the last name, so our program so far is working correctly. Now it's contain the applicants who are above 18. Rick, age 25. This time it asks us change in the last name. Let's try Ryan and he is male. Now it's intend. Lucy, Also 25 Last name That's a rose and Female said to Lucy is one below and one above and noticed the sicker one because of the age makes it through to the next part of the if statement. Now let's entering. Joe Blog's Joe, Age 18. Last name Blog's so far. It is work correctly. I am. And there we go. Lucy X, rob X, which is correct. Mr. Ryan is a lot into the program. Miss Rose is allowed into the program. And finally, Mr Blog's is allowed into the program. All are methods have worked correctly and we have our tickets printed below. And did he have? My answer to this course is project. If you struggled. If this project I recommend going through the license again and try occurred in the program one small. However, if you were successful and your program worked correctly, then congratulations. You have completed your object orientated programming course with visual studio. See, shock. That concludes this lesson in the next video are Summarize what you've learned in this course. 10. Conclusion to Visual Studio: Your Guide to Basic C# OOP Programming: And that concludes your OPC shop course with visual studio. At the beginning of this course, you were introduced to the concepts off object orientated programming. The many intricacies of object orientated programming can often be confusing to any programmer. But having practiced and completed the tasks that I have set for you in this course, you've come through the other side far more knowledgeable on the subject. We, as programmers, have been using methods and classes that were ourselves have not created whether they be but other programmers or imported via the I. D. E s default sittings. Bernie, This course you have not created your own classes and your own methods. You have taken that one big step into the world of programming becoming more creative in your koerting than you were before. However, this isn't the end of programming. With practice and further study, you'll be able to create more complex and better programs constantly improving as you go. Thank you for taking my earpiece, Ishaq course with visual studio and I hope it helps you in the pursuit of your programming career and good luck with your further studies on programming.