C# Programming: Your Beginner Guide to Basic OOP with C# | Matthew Dewey | Skillshare

Playback Speed


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

C# Programming: Your Beginner Guide to Basic OOP with C#

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 to C# Programming: Your Beginner Guide to Basic OOP with C#

      3:19
    • 2. Classes Introduction

      3:52
    • 3. Class Creation

      6:09
    • 4. Methods Introduction

      6:12
    • 5. Void Method Practice

      4:29
    • 6. Typed Method Practice

      6:11
    • 7. OOP Practice

      11:06
    • 8. Project Discussion

      2:51
    • 9. Project Answer

      12:44
    • 10. Conclusion to C# Programming: Your Beginner Guide to Basic OOP with C#

      1:34
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

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.

67

Students

--

Projects

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.

0cb1dc32.png

My name is Matthew, 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. OOP is a vital skill in today's programming world, so as such I felt it necessary to create a course that will help you learn the basics of C# programming.

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 on OOP! With my course, I can guarantee that the knowledge you learn will help you in your career or further studies on C# programming. I hope you enjoy the course and it helps you on your way into the world of programming!

Meet Your Teacher

Teacher Profile Image

Matthew Dewey

Writer, Writing Tutor

Teacher

I have been writing and teaching for years, helping tens-of-thousands of students achieve their goals, be it completing their novel 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 headstart.

If you want to write a novel, a story that has been on your mind and not on paper for too long, my courses will not only help you start, but I will be there as well. Any work you submit, I will happily read, review. If you need professional advice or a friendly opinion, I will be there for both.See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    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.

Transcripts

1. Introduction to C# Programming: Your Beginner Guide to Basic OOP with C#: 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 told thousands of students over these years, I have discovered how much the new age of programmers 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 Rajan on paper or practicing theory, but by coding 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 take human beginning calls visual studio, the basic See shop programming course you'll learn all you need to know and the foundations of seashore 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 an O. P program, you're 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 at our 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 O p program that meet certain specifications to carry out a simple task, of course, present these lessons and project and 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 shop. 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 code 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 class 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 his 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. We're working with objects. What you may know already is that you've been using classes since the start off programming . Except these classes are 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 see shop class in the same project. This can be easily done by adding an atom, a C shop class. 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 late 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 class 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 execute herbal 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 were 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 to the class itself, it will throw an era. For example, we have a simple up Portland council dot right line double quotations have love closed. 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 class 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 between 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 Sanaa main program. So let's practice creating an object. Now we're back to our main 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 semi colon. 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 our class one costs. It's a racist lon top in Class one. Let's call it test equals new plus one. Close the singer Cullen. 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 preferred 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 admitted that 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 takes 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 the mace ID 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 make that can be used to give value to a variable. It will look something like the land as follows. We have a string variable code name equals object name. Don't make the name a set of brackets. Same occur onto and off the land. 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. Afterwards, I've placed the text love in double quotations. What this will induce. Return the string value off Hello, placing 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 fall. 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 of brackets We didn't open up a for section of code, and inside you have written an example line, which isn't even necessary. Consul, don't rattle on a set of brackets. Hello, closed the semi colon. If this method were to run, it would simply print alarm. Hello Now avoid May. That doesn't need to have any code within it to run. Unlike the top method, which requires a return alarm, the void method returns void, which means the Kurt and avoid Method is primarily used for daughter processing. Value finding or other larger tasks are 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 by setting additional very rules. In a set of brackets that follows the Method name, for example, we have void Mrs name and inside to set of brackets string would created in the section below. We have created a lan that as word equal. Hello, Commerce Space Plus would and then we print out the valley. Would we have avoid method modifying a string cold? 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 from 1/3 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 tab to 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 console. In the main program, we give these values by topping in the object name dot mated. Name the set of brackets. We then have our String Valley John also 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 to 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 the year. Now that we've created are close, let's get straight into creating a void method to create admitted. We first have to make sure it's public so that we can be received by the main program so public. And since 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 of variables. We'll be having a string name for the name Variable, and we're gonna have an intern from age. We didn't open up our code section with a set of brackets. Then we go straight into the code 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 after not section of code, we're gonna then use the council to rot on, 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, right Don name plus Democrat stations is not admitted close the same in current. Now that we've created are void message rigor to our main program and create an 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 the city brackets close to the semicolon. 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 same me colonel. And since it's avoid miss it and it has the council right lands within its code or we need to do is run out program. So control Pfaff. 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. They got a 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 tapped 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 you are too great and use topped methods. In the previous video, we practice using void methods. In the omitted 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 Method 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 going to 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 result and we're going to give it a valley off this double quotations. It's therefore a null value. And now we're gonna just avoid method to change the results value to what is written in the council. Right, Lance, instead of Consul Rutland 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 culture right lot. So to do that, let's a 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 class. So that way, all methods below have access to them. As you can see now in this void method and now we're gonna create the top meted, which is simply just return the result. Our top message will be public string and we're gonna call it final result said brackets will been 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. Create an object writer. Taste equals new writer. We're then gonna use the void. Makes that age tick test dot age. Check off the values, John and 25 again closed the semi colon. And then we're going to create a council right line in the main program consul dot Right, And inside the brackets, we're gonna have test dot final result close to the semi colon. What does 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 right land. So let's taste on a program now about pressing control if, as you could see it as printed, John is admitted in the council. So our programme is successful. We've not only learned how to create a top committed, but we've also used it with a void method has always taken advantage off local very rules such a string result. At the same time, we can create civil methods that take advantage of the string result as well, and not just return it like our top to miss it. 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 need a draught. 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 subclass 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 going to call this close the process class and click add. Once we have done that, you'll see them in the Solution Explorer program being online program and process being our close. Now let's discuss what the program will be doing in depth. But 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 doctor. 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 admitted will be a string topped method which will return the result which will be supported in the main program. First, let us create the variables that we're gonna restoring the valleys in. Let us create a string and call it a 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 co 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 myth that 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 consul dot right line Double quotations Inter Your last name Semi Colon L Name equals console dot reid . Line constantly right line again, this time into you'll age and we convert the string into interject by going age equals convert 0.2 int 32. Open up up brackets Council don't read line close to the same a car and that is our first method. Next, real creates the method which will process the daughter public void, and we nickel this one processing a state of brackets and our section two into a coating. You've done that. Let's decide on what we processing the daughter to. Since we have age, we're gonna take from what we did in our previous programs and check to see if the age is above a certain 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 it's got 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 plus come in space plus name. Double quotations is allowed in the program close with Semi Conan within creating else we copy the run change. 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 a school 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 create an object and make use of them. Okay, 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. Thus it 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 enter in our first name and under school flashing to indicate that we are allowed to intervene a value let's enter in John and then asks us to enter in the last name. So I first met. It 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 lesson ins, I'm going to 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 high. How many times we want saving result 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 message that we have now created inside those claws 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 year. What we're going to do then, is make use of their treat and processing methods inside the result method. Always simply need Do this. Stop in the name off the method. Receive a set of brackets close with semi colon. All we need to do is stop in 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 now, 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 the user decides to process some daughter, they can immediately entering the daughter 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 and future of several methods, not just three, you've 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. This method will be called the ticket print method, and it'll make use off 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 great 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 double quotations. 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 solicits. Recall this the receive method, a set of brackets and we open up our section of code 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 front to display a message into first name because the cynical within creator Lan, which places a value inside the first name of the council dot reid love that will get us our first name. We now creates another one council dot right. I don inter age closer to save your column. We didn't have a judge equals convert Dutch, too. Int 32. Open a set of bracket consul dot reid lan 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 breakdown 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 double quotations enter last name because of the scenic going on. We then have l name equals console, don't read land. We then create another message consul dot right Ron at Ask the user to inter gender Kerlon M or closer to semi colon, but then create the variable string agenda equals council Don't read. Now that we have those values, we create another. If statement if gender equals equals double quotations, uppercase M result equals double quotations, mr dot space us No name plus stubborn filtration space is allowed into the program close to the cynical on everything creates an else for the female. We copy that long paste it 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 in an upper case X close of 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 receptions 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 through done that we asked the user to enter in the number of applicants, but first a council dot right fun double petitions in tow, number of applicants close to the same economy. We then have number equals console does read equals convert 0.2 int 32 Open up Records Council. Dr Reid Blanc 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 close to the seamy 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 year. We make Finn results equal thin results plus double quotations backslash into starting Yulon plus temp, not return result. And now that we've got all our results placed inside the result variable, let's print it council dot Right lon Often result close with the Simic off. We now got Charlemagne program. We create the receptionist object receptionist, test vehicles. New receptionist close to the semi colon were then used its one and only method test done. Ticket print double brackets close with a 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. Sick and two 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 let's try 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 maintain the applicants who are above 18 Rick, age 25. This time it asks us change in the last name. So 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 sick of 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 they 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 cause 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 C# Programming: Your Beginner Guide to Basic OOP with C#: 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.