Posts

Showing posts from November, 2023

Playing C64: Airborne Ranger 11/11/2023

Image
In the past week I was introduced to this interesting game from 1987. It is a pretty good piece of programming for its time, incorporating some early "stealth" gameplay features. It is reminiscent of Metal Gear.

Java: 3 Easy programs for Class and Objects basics in Java.

Image
Programs: // 1.   Create a class Vehicle. //      a.  The class should have two fields: //          i.  no_of_seats and no_of_wheels. //      b.  Create two objects //          i.  Motorcycle and Car for this class. //      c.  Your output should show the descriptions for Car and Motorcycle package A6 ; class Vehicle {     // Initialize attributes:     int no_of_seats ;     int no_of_wheels ;     // Two-argument constructor:     Vehicle ( int seats , int wheels ) {         no_of_seats   = seats ;         no_of_wheels = wheels ;     }     // Displays values of attributes:     String display () {         return "no_of_seats = " + no_of_seats + ", no_of_wheels = " + no_of_wheels + "." ;     }     public static void main ( String args [])     {         // Create two objects: Motorcycle and Car.         Vehicle motorcycle = new Vehicle ( 1 , 2 );         Vehicle car = new Vehicle ( 5 , 4 );         // Output descriptions of the two obje