/// some boring classes sharing some commmon traits, but not related // by inheritance... (for purpose of illustrating 'crosscutting concerns') class student { public final String name; private double gpa; // note private public student(String n) { name=n; gpa = ((int)(Math.random()*401))/100.0; } public String toString() { return "student "+name+" has a "+gpa+" GPA"; } public void run() { System.out.println("huff and puff..."); } } class vehicle { public final String make; public final String model; public final int year; public int price = 30000; public vehicle(String b, String m, int y) {make=b; model=m; year=y;} public String toString() {return year+" "+make+" "+model;} public void run() { System.out.println("zoom zoom"); } }//vehicle class pc { public final String cpu; public int RAM; // in GB public int Storage; // in TB public int price = 1000; public pc(String c, int r, int s) { cpu=c; RAM=r; Storage=s; } public void run() // note: not related to other .run methods { throw new RuntimeException("System Fault. Must Reinstall OS"); } } public class aop19 { public static void main(String[] av) { try { System.out.println("What the hell is this AspectJ thing?"); System.out.println("csc123 sucks and Liang is the worst professor ever!\n"); student s = new student("Nev Erstudy"); vehicle v = new vehicle("Honda","Accord",2009); pc yourpc = new pc("intel i7",16,5); // 16gb ram, 5tb disk s.run(); v.run(); yourpc.run(); } catch(RuntimeException re) {System.out.println(re);} }//main }