In this tutorial, I will talk about class structures that many people know about syntax but do not use many of its important features. In this lesson, I will not teach classes, I will create real projects and show the class structures in those projects so it would be useful to know the classes in at least one programming language.
What are Class and Object?
Objects are generated from classes, they can be thought of as subsets of classes, for example, telephony objects in a product class that you create. Classes, on the other hand, are a broader concept that can be thought of as the main set of objects, objects derived from classes.
Project 1 – Online Shopping Project
Don’t worry about swing framework etc. We will not do a visualization with tools like. Our topic is to set up an online store (in console application format). We will buy the object that the user wants, then we will use this object from the product class.
The main file stores classes where the productManager is for creating an object, there is a product class outside this class, this class is a subclass for a product manager, in short, it stores the data of the product.
The above project manager class contains a constructer and a string ends. When called with this constructer, it stores the information of the product and then prints it to the screen with the Show function.
This project and write will update every day.