


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The answers and explanations for practice test 1 of csc 335 fall 2006. It covers topics such as objects, classes, and relationships between them, as well as creating candidate objects for a system and drawing uml diagrams. It also includes examples and exercises.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Every object has
Relationship between a class diagram and two instance diagrams (on the right) after these two constructions BankAccount anAcct = new BankAccount("Stoers", 333.33); BankAccount acct2= new BankAccount("Daly", 75.00);
BankAccount: anAcct my_ID = "Stoers" my_balance = 333. my_ID = "Daly" my_balance = 75. BankAccount: acct
rule-spam rule-AOL rule-Bad Text
//... NumberListener listener = new NumberListener(); myField.addActionListener(listener); //... cp.add(prompt, BorderLayout. NORTH ); cp.add(myLabel, BorderLayout. CENTER ); cp.add(myField, BorderLayout. SOUTH ); } private class NumberListener implements ActionListener { public void actionPerformed(ActionEvent ae) { try { double num = Double. parseDouble (myField.getText()); myLabel.setText("You entered: " + num); } catch (NumberFormatException nfe) { myLabel.setText("!!ERROR"); } } } }