2. The elastic rebound theiry suggests which of the following? A. Some earthquakes are produced by the rapid release of energy stored in rock that has been subjected to minimal forces. B. Most earthquakes are produced by the slow release of energy stored in rock that has been subjected to great forces. C. Some earthquakes are produced by the slow release of energy stored in rock that has been subjected to minimal forces. D. Most earthquakes are produced by the rapid release of energy stored in rock that has been subjected to great forces.
The elastic rebound theiry suggests that this is not a computer question you have posted in the computer area. =/
Practicing enumeration, gui & the likes. ``` import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Judge { enum subject { COMP_SCI, GEOLOGY, BIO, MATH, ENGLISH, ART } public static void main(String[] args) { Judge j = new Judge(); } public Judge() { JFrame frame = new JFrame("Organization Wizard"); frame.setSize(400, 300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel pan = new JPanel(); pan.setBackground(Color.BLACK); JLabel lab = new JLabel("To which subject does your Q pertain?"); JButton b1 = new JButton("computer science"); JButton b2 = new JButton("geology"); JButton b3 = new JButton("biology"); JButton b4 = new JButton("math"); JButton b5 = new JButton("english"); JButton b6 = new JButton("art"); b1.setBackground(Color.MAGENTA); b2.setBackground(Color.YELLOW); b3.setBackground(Color.WHITE); b4.setBackground(Color.ORANGE); b5.setBackground(Color.RED); b6.setBackground(Color.PINK); b1.addActionListener(new SubjectCheck()); b2.addActionListener(new SubjectCheck()); b3.addActionListener(new SubjectCheck()); b4.addActionListener(new SubjectCheck()); b5.addActionListener(new SubjectCheck()); b6.addActionListener(new SubjectCheck()); lab.setForeground(Color.GREEN); pan.add(lab); pan.add(b1); pan.add(b2); pan.add(b3); pan.add(b4); pan.add(b5); pan.add(b6); frame.add(pan); frame.setVisible(true); } private class SubjectCheck implements ActionListener { public void actionPerformed(ActionEvent e) { String bPressed = e.getActionCommand(); char subj = bPressed.charAt(0); subject enumSubj = subject.COMP_SCI; switch(subj) { case 'c': enumSubj = subject.COMP_SCI; break; case 'g': enumSubj = subject.GEOLOGY; break; case 'b': enumSubj = subject.BIO; break; case 'm': enumSubj = subject.MATH; break; case 'e': enumSubj = subject.ENGLISH; break; default: enumSubj = subject.ART; break; } String str = enumSubj.toString(); str = str.toLowerCase(); String message2User = ""; if(enumSubj.ordinal() > 0) { message2User = "Your question belongs in the " + str + " section."; } else message2User = "Your question is in the right place."; JFrame popup = new JFrame("Message to User"); popup.setSize(700, 700); popup.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); JPanel p2 = new JPanel(); JLabel l2 = new JLabel(message2User); p2.setBackground(Color.DARK_GRAY); l2.setForeground(Color.ORANGE); p2.add(l2); popup.add(p2); popup.setVisible(true); } } } ```
Join our real-time social learning platform and learn together with your friends!