Level 20 speed 45 health points 70 player1 player2

This preview shows page 16 - 18 out of 18 pages.

... Level :20 Speed: 45 Health points: 70 ... ... Player1 Player2 COMP 1210 – Fundamentals of Computing I Slide 1 - 32 Object-Oriented Programming (cont.) New classes are derived from existing ones through inheritance . Employee Staff Faculty StudentWorker Advisor Suppose you were creating a program to track employees at Auburn University...
Image of page 16

Subscribe to view the full document.

17 COMP 1210 – Fundamentals of Computing I Slide 1 - 33 Object-Oriented Programming (cont.) OOP is intended to support software reuse . Class libraries are an important element of this support. Class libraries are sets of classes designed to be reusable components whose services can be used by many programs. The Java Application Programming Interface ( API ) is a set of class libraries that comes with the JDK . The Java API is organized into packages such as java.awt , java.io , java.lang , and java.net Example: The System class that you use in your output statements is in the java.lang package COMP 1210 – Fundamentals of Computing I Slide 1 - 34 Applications v. Applets Java programs can be executed in a “stand alone” fashion just like programs in other languages. Such a Java program is called an application . One of the distinguishing features of Java is that its bytecode can be embedded in an HTML document, transported across a network, and executed within a web browser. Such a Java program is called an applet .
Image of page 17
18 COMP 1210 – Fundamentals of Computing I Slide 1 - 35 Applet Example import java.awt.*; import java.applet.*; public class WarEagleApplet extends Applet { public void paint (Graphics page) { page.drawString("War Eagle!", 20, 20); } } <html> <head> <title>An Applet Example</title> </head> <body> <p> Here is a quote from the Plains: </p> <applet code="WarEagleApplet.class"> </applet> </body> </html> End Show Applet! WarEagleApplet.java
Image of page 18
You've reached the end of this preview.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern