Classes – Part 1

Classes: Part 1 – Computer Science 30S

NOTE: you can find another copy of this example on the GitHub branch here

  • Continue to build on a large example for this course that will help you learn the content and have a reference for you when you complete assessments
  • So start by opening the previous example and adding to it
  • Add to the main method:

Captursdgse(36)

  • Now add the learnClasses() method:

Captur1sdgsge

  • Now add a class to the project:

Picture3(sdgsg8)

  • And select Java class…

Picturefdhdf4(6)

  • Add a class called Person and then add this code to the Person.java class:

Capture2hgs(24)

  • And add this code:

Capture3(16sdgsg)

  • And add this code:

Capture4(sdgsg15)

  • And add this code:

Capture5sdgg(8)

  • And now go back to the ComputerScience30S.java class and add to the learnClasses() method:

Capture6vjf(7)

  • Run the application to make sure you have no errors!

The NEXT thing to read/watch is the “Classes Part 2” content page