Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercises EX 3.1 Write a statement that prints the number of characters in a String object called overview. Fx32 XX 3.2 Write a statement
Exercises EX 3.1 Write a statement that prints the number of characters in a String object called overview. Fx32 XX 3.2 Write a statement that prints the 8th character of a String object called introduction. EX 3/4 Write a declaration for a String variable called change and ini- tialize it to the characters stored in another String object called original with all 'e' characters changed to 'j'. EX 3.5 What output is produced by the following code fragment? String m1, m2, m3; m1 m2 mp3 "Quest for the Holy Grail": m1.toLowerCase(): m1 + " + m2: System.out.println(m3.replace('g'. z)) 539 EX 3.9 Write an assignment statement that computes the square root of the sum of num1 and num2 and assigns the result to num3. 144 CHAPTER 3 Using Classes and Objects EX 3.10 Write a single statement that computes and prints the absolute value of total. Jx3.11. 3.11 Write code statements to create a DecimalFormat object that will round a formatted value to four decimal places. Then write a statement that uses that object to print the value of result, nonerly formatted. double days U .... 13.14 Compare and contrast a traditional coordinate system anu un coordinate system used by Java graphical components. EX 3.15 Write a declaration for each of the following: X315 a. A line that extends from point (60, 100) to point (30, 90). X. A rectangle that is 20 pixels wide, 100 pixels high, and has its upper-left corner at point (10, 10). c. A circle that is centered at point (50, 75) and has a radius of 30. d. An ellipse that is centered at point (150, 180) and is 100 pixels wide and 80 pixels high. EX 3.16 Are the following lines horizontal, vertical, or neither? a. new Line (30. 90, 30, 10). b. new Line (85. 70. 70. 85) c. new Line (20. 40. 150. 40) EX 3.17 Is each of the following ellipses wider than it is tall or taller than it is wide? A. new Ellipse (300, SEX 3.1 b, new Ellipse (100. 100, 50, 10) 200. 20. 40) c. new Ellipse (150, 220, 60. 30) 3.18 How do you make a shape that has no fill color, so that you can see the elements behind it? EX 3.19 Write a line of code that rotates an ellipse called my Ellipse 45 degrees clockwise.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
So the output will be Quest for the Hol...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started