Lecture23 - Java Programming, 3e Concepts and Techniques...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes (V) ICTN 2730 Lecture 23 03/05/2008 2 Assignments Read chapter 5 and lecture notes. Homework 7 is due tonight. Please test your programs after uploading. Homework 8 will be posted Thursday night. It is due on Wednesday (3/19) after the spring break. Todays Office Hours: 11 am -1 pm. If I am not in RM C119, check RM C126. 3 Homework 6 Checkbox objects in the same CheckboxGroup are mutually exclusive. CheckboxGroup codeGroup1 = new CheckboxGroup(); Checkbox dollarBox = new Checkbox("US Dollar",false, codeGroup1 ); Checkbox euroBox = new Checkbox("Euro",false, codeGroup1 ); 3 4 Homework 6 getExchange() method public double getExchange(double money) { int code = 0; double USD=0; double ExchangeRate=1.45; if (dollarBox.getState()) code = 1; else if (euroBox.getState()) code = 2; if (code==1) USD=money; if (code==2) USD=money*ExchangeRate; return USD; } 4 5 Homework 6 Bonus Need to understand the values of dollars and empCode payment is the entered sales amount dollars is the converted sales amount empCode is the code for sales type answer is the commission If both the currency type and the sales type are selected, dollars and empCode should be greater than zero. If only the sales type is selected, empCode is greater than zero....
View Full Document

This note was uploaded on 04/29/2008 for the course ICTN 2730 taught by Professor Li during the Spring '08 term at East Carolina University .

Page1 / 19

Lecture23 - Java Programming, 3e Concepts and Techniques...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online