They have a magnificent team. These people are always kind and willing to listen to your concerns or issues. Better yet, your assignment is always ready before the time, they usually send you a draft to double-check before they finalize your paper.
Project 2
Using GUIGreet.java as a model, create a Java stand-alone GUI program that displays a Fahrenheit to Celsius temperature conversion table in an AWT Frame
or a swing JFrame
. The table should run from 0 degrees Fahrenheit to 250 degrees Fahrenheit, in steps of 10 degrees. Round the Celsius temperature values to the nearest integer.
Display any temperatures below the freezing point of water (32o Fahrenheit) in blue and any temperatures above the boiling point of water (212o Fahrenheit) in red (the rest in black).
The formula to use is:
Degrees Celsius = ( 5 ÷ 9 ) × ( Degrees Fahrenheit – 32 Degrees )
See TempConv.jar model solution for a sample chart; just download and double-click to run.
You must turn in a stand-alone AWT or swing program, not an Applet
or JApplet
nor a JavaFx program. You must meet all the requirements from the description above. If you include any creative extras, be sure your program still performs the basic chart as described above. Creative extras are extras, and you are not free to modify the project requirements.
It is not acceptable to pre-compute each Celsius value, and just have many “g.drawString()
” statements. You need to use Java to calculate each value using the correct formula, and use various control structures.
GUI Greet Java
// A stand-alone GUI Java program to display a friendly greeting.
2: // Also added code to close the application when the user clicks
3: // the mouse in the close box.
4:
5: // Written by Wayne Pollock, Tampa, FL USA, 1999
6:
7: import java.awt.*;
8: import java.awt.event.*;
9:
10: public class GUIGreet extends Frame
11: {
12: private String message = "Hello, World!";
13:
14: public GUIGreet ()
15: {
16: setTitle( "A Friendly Greeting" );
17: setSize( 300, 200 );
18: setVisible( true );
19:
20: addWindowListener(
21: new WindowAdapter()
22: { public void windowClosing( WindowEvent e )
23: { System.exit( 0 );
24: }
25: }
26: );
27: }
28:
29: public static void main ( String [] args )
30: {
31: GUIGreet me = new GUIGreet();
32: }
33:
34: public void paint ( Graphics g )
35: {
36: g.setColor( Color.RED );
37: g.drawRect( 30, 40, 240, 130 );
38: g.setColor( Color.BLUE );
39: g.setFont( new Font( "SansSerif", Font.BOLD, 24 ) );
40: g.drawString( message, 70, 110 ); // Position determined
41: } // by trial and error!
42: }
Homework 2
number
is 30
? If number
is 35
?
i
such that
0 ≤ i < 20
?10 ≤ i < 20
?10 ≤ i ≤ 50
?(ch >= 'A' && ch <= 'Z')
ch
is 'A'
?ch
is 'p'
?ch
is 'E'
?ch
is '5'
?true
if weight
is greater than 50
pounds or height
is greater than 60
inches.String
variable dayName
with Sunday
, Monday
, Tuesday
, Wednesday
, Thursday
, Friday
, and Saturday
, if the int
variable day
is 0
, 1
, 2
, 3
, 4
, 5
, and 6
, accordingly.for
loop on the left is converted into the while
loop on the right. What is wrong? Correct it.1: int sum = 0; 2: for (int i = 1; i <= 4; i++) { 3: if (i % 3 == 0) continue; 4: sum += i; 5: }1: int i = 1, sum = 0; 2: while (i <= 4) { 3: if (i % 3 == 0) continue; 4: sum += i; 5: i++; 6: }
break
statement is executed in the following loop, which statement is executed? Show the output.1: for (int i = 1; i < 4; i++) { 2: for (int j = 1; j < 4; j++) { 3: if (i * j > 2) 4: break; 5: System.out.println(i * j); 6: } 7: System.out.println(i); 8: }continue
statement is executed in the following loop, which statement is executed? Show the output.1: for (int i = 1; i < 4; i++) { 2: for (int j = 1; j < 4; j++) { 3: if (i * j > 2) 4: continue; 5: System.out.println(i * j); 6: } 7: System.out.println(i); 8: }Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more