jgs CSE 460 Software Analysis and Design Lecture 15: Practice Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
jgs 00000001 Agenda § Sample Exam is available. Test your system ASAP § Read the Online Proctored Exam Guidelines to know what to do in case of a problem during the exam § Midterm Exam available March 10 only during lecture time from 4:30 pm to 5:45 pm. § No lecture that day. Go directly to your exam § It is a CLOSED BOOK exam. Do not use any material § Scratch paper is allowed. Empty White Paper. Show it on camera when you show your environment!
jgs 00000001 HelperCompanion public class HelperCompanion extends CompanionDecorator { @Override public void doSomething(){ super.doSomething(); System.out.print(" I am here to help you. "); } }
jgs 00000001 AffectiveCompanion public class AffectiveCompanion extends CompanionDecorator { @Override public void doSomething(){ super.doSomething(); System.out.print(" I am here to cheer you."); } }
jgs 00000001 AffectiveCompanion import javax.swing.ImageIcon; import javax.swing.JComponent; import javax.swing.JLabel; public class AffectiveCompanion extends CompanionDecorator { @Override public void doSomething(JComponent panel){ super.doSomething(panel); ImageIcon face = new ImageIcon("src/cheer.png"); JLabel label = new JLabel(); label.setIcon(face); label.setHorizontalTextPosition(JLabel.CENTER); label.setVerticalTextPosition(JLabel.BOTTOM); label.setText("I am here to cheer you."); panel.add(label); } }
jgs 00000001 HelperCompanion import javax.swing.ImageIcon; import javax.swing.JComponent; import javax.swing.JLabel; public class HelperCompanion extends CompanionDecorator { @Override public void doSomething(JComponent panel){ super.doSomething(panel); ImageIcon face = new ImageIcon("src/bubble.png"); JLabel label = new JLabel(); label.setIcon(face); label.setHorizontalTextPosition(JLabel.CENTER); label.setVerticalTextPosition(JLabel.BOTTOM); label.setText("I am here to help you."); panel.add(label); } }
jgs CSE 460 Software Analysis and Design Javier Gonzalez-Sanchez [email protected] Fall 2020 Disclaimer. These slides can only be used as study material for the class CSE460 at ASU. They cannot be distributed or used for another purpose.