VB.NET question: why is a class being created here?

I'm really new to computer programming and I'm taking a very independent online course without an instructor. I'm learning about object-oriented programming. Here is a screen-shot of an example given in the course:
http://curriculum.kcdistancelearning.com/courses/PROG1s-HS-A08/s/unit4/resources/images/vb_3.4.3.JPG

What I don't understand is why it was necessary to create a class in order to add two numbers? Earlier in the course they taught us a shorter way to design a program that adds 2 numbers:
http://curriculum.kcdistancelearning.com/courses/PROG1s-HS-A08/s/unit3/resources/images/4.4.6.jpg

It seems the first way we learned is more concise. Why must a class be created to add 2 numbers, when they could just declare 2 variables and declare a 3rd one as the sum of the first 2?
 
Back
Top