The _________ class declares methods and constants for manipulating colors in a Java application.

a) Color
b) GraphicsColor
c) Colors
d) GraphicsColors

a) Color

Computer Science & Information Technology

You might also like to view...

The Enter Parameter Value Dialog Box appears when you have separated a table name and field name with a colon

Indicate whether the statement is true or false

Computer Science & Information Technology

Develop an application that calculates a salesperson’s commission from the number of items sold (Fig. 11.20). Assume that all items have a fixed price of 100 dollars per unit. Use a switch statement to implement the following sales commission schedule:

Fewer than 10 items sold = 1% commission
Between 10 and 39 items sold = 2% commission
Between 40 and 99 items sold = 3% commission
More than 99 items sold = 4% commission

a) Copying the template to your working directory. Copy the directory C:Examples Tutorial11ExercisesSalesCommissionCalculator to your C:SimplyJava directory.
b) Opening the template file. Open the SalesCommissionCalculator.java file in your text editor. In the template, line 127 in the calculateJButtonActionPerformed method obtains the number of items sold that was entered by the user, converts the number to an int value and assigns the value to the int local variable items. Line 129 declares the double constant DOLLARS_PER_UNIT to represent the cost for each item sold. Line 132 creates the DecimalFormat variable dollars that will be used to for- mat the gross sales and the salesperson’s earnings for display purposes.
c) Calculate the gross sales. In calculateJButtonActionPerformed, insert a stat

Computer Science & Information Technology