HOW TO CREATE A CLASS Steps 1 Create

  • Slides: 9
Download presentation
HOW TO CREATE A CLASS Steps: 1. Create a project. Use any meaningful name

HOW TO CREATE A CLASS Steps: 1. Create a project. Use any meaningful name you want. 2. Create a GUI for a program that inputs a decimal value and displays a tax amount in a currency format:

HOW TO CREATE A CLASS Steps: 3. Enter this code within the button-click code.

HOW TO CREATE A CLASS Steps: 3. Enter this code within the button-click code.

HOW TO CREATE A CLASS Steps: 4. Select the project name and right-click on

HOW TO CREATE A CLASS Steps: 4. Select the project name and right-click on it.

HOW TO CREATE A CLASS Steps: The screen should now look like this. 5.

HOW TO CREATE A CLASS Steps: The screen should now look like this. 5. Select Add, then Class.

HOW TO CREATE A CLASS Steps: The screen should now look like this. 6.

HOW TO CREATE A CLASS Steps: The screen should now look like this. 6. Select Class below and type in the class name. This example uses cls. Calculate. Sales. Tax. vb. Don’t forget to press “Add”

HOW TO CREATE A CLASS Steps: 7. Your screen should now look like the

HOW TO CREATE A CLASS Steps: 7. Your screen should now look like the one below. 8. Add the class code here. (See the next slide for the class code. )

HOW TO CREATE A CLASS Steps: 9. After entering the class’s code below, your

HOW TO CREATE A CLASS Steps: 9. After entering the class’s code below, your class should look like this.

HOW TO CREATE A CLASS Steps: 10. The solution explorer should now look like

HOW TO CREATE A CLASS Steps: 10. The solution explorer should now look like this. Your class has been added to your project and is now a file within your project. Your class is here as a “. vb” file.

HOW TO CREATE A CLASS Steps: 11. Congratulations. You have just written your first

HOW TO CREATE A CLASS Steps: 11. Congratulations. You have just written your first class. 12. Next, run your project. It should work. 13. Don’t forget to save your project. You must understand this code to be able to do the next program.