Introduction to Java Programming and Data Structures: Brief Version (11th Global Edition)
11th Edition
ISBN: 9780134671710
Author: Y. Daniel Liang
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 14.11, Problem 14.11.3CP
Program Plan Intro
Shapes:
There are many shape classes in JavaFX in order to draw shapes like circles, rectangles, arcs, texts, polygons, etc. It is an abstract class that describes some common properties like “fill”, “stroke”, and “strokeWidth” for all shapes.
- “fill” property – It is used to specify a color that has to be given inside the shape.
- “stroke” property – It is used to specify the outline color.
- “strokeWidth” property – It is used to specify the thickness of the stroke.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Create a vector (v). which consists of 25 equally spaced points in the range from -21 to 3TT. Then, perform each of the following:
d) Remove the last element in (v).
e) Plot f cos(v) with linewidth - 2 and title Sinusoidal Waveform
7.Do code complete"""You are given an n x n 2D mat representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:Could you do this in-place?"""
# clockwise rotate# first reverse up to down, then swap the symmetry# 1 2 3 7 8 9 7 4 1# 4 5 6 => 4 5 6 => 8 5 2# 7 8 9 1 2 3 9 6 3
def rotate(mat): if not mat: return mat mat.reverse() for i in range(len(mat)): for j in range(i): mat[i][j], mat[j][i] = mat[j][i], mat[i][j] return mat
if __name__ == "__main__": mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]].
Use C Program
Input and output in the image must be the same as the result
Chapter 14 Solutions
Introduction to Java Programming and Data Structures: Brief Version (11th Global Edition)
Ch. 14.2 - Explain the evolution of Java GUI technologies.Ch. 14.2 - Prob. 14.2.2CPCh. 14.3 - Prob. 14.3.1CPCh. 14.3 - Show the output of the following JavaFX program:...Ch. 14.4 - How do you create a Scene object? How do you set a...Ch. 14.4 - Prob. 14.4.2CPCh. 14.4 - Prob. 14.4.3CPCh. 14.4 - How do you replace the code in lines 20 and 21 in...Ch. 14.5 - Prob. 14.5.1CPCh. 14.5 - Prob. 14.5.2CP
Ch. 14.5 - Can you create an object of IntegerProperty using...Ch. 14.5 - Prob. 14.5.4CPCh. 14.6 - Prob. 14.6.1CPCh. 14.6 - Prob. 14.6.2CPCh. 14.7 - How do you create a color? What is wrong about...Ch. 14.7 - Prob. 14.7.2CPCh. 14.7 - Prob. 14.7.3CPCh. 14.8 - Prob. 14.8.1CPCh. 14.8 - Prob. 14.8.2CPCh. 14.9 - Prob. 14.9.1CPCh. 14.9 - Prob. 14.9.2CPCh. 14.9 - Prob. 14.9.3CPCh. 14.10 - Prob. 14.10.1CPCh. 14.10 - Prob. 14.10.2CPCh. 14.10 - Prob. 14.10.3CPCh. 14.10 - Prob. 14.10.4CPCh. 14.10 - Prob. 14.10.5CPCh. 14.11 - How do you display a text, line, rectangle,...Ch. 14.11 - Prob. 14.11.2CPCh. 14.11 - Prob. 14.11.3CPCh. 14.11 - Write code fragments to fill red color in a...Ch. 14.11 - Prob. 14.11.5CPCh. 14.11 - Prob. 14.11.6CPCh. 14.11 - Write code fragments to display the outline of the...Ch. 14.11 - Write code fragments to display the lower half of...Ch. 14.11 - Write code fragments to display a polygon...Ch. 14.11 - Write code fragments to display a polygon...Ch. 14.11 - Prob. 14.11.11CPCh. 14.12 - Prob. 14.12.1CPCh. 14 - Prob. 14.1PECh. 14 - Prob. 14.2PECh. 14 - (Display three cards) Write a program that...Ch. 14 - (Color and font) Write a program that displays...Ch. 14 - (Characters around circle) Write a program that...Ch. 14 - Prob. 14.6PECh. 14 - (Display random 0 or 1) Write a program that...Ch. 14 - (Create four fans) Write a program that places...Ch. 14 - (Display a cylinder) Write a program that draws a...Ch. 14 - Prob. 14.11PECh. 14 - (Display a bar chart) Write a program that uses a...Ch. 14 - Prob. 14.13PECh. 14 - (Display a rectanguloid) Write a program that...Ch. 14 - Prob. 14.15PECh. 14 - Prob. 14.16PECh. 14 - (Game: hangman) Write a program that displays a...Ch. 14 - Prob. 14.18PECh. 14 - (Plot the sine and cosine functions) Write a...Ch. 14 - (Draw an arrow line) Write a static method that...Ch. 14 - Prob. 14.21PECh. 14 - (Connect two circles) Write a program that draws...Ch. 14 - (Geometry: two rectangles) Write a program that...Ch. 14 - (Geometry: Inside a polygon?) Write a program that...Ch. 14 - Prob. 14.25PECh. 14 - Prob. 14.27PECh. 14 - (Random time) Modify the ClockPane class with...Ch. 14 - (Game: bean machine) Write a program that displays...
Knowledge Booster
Similar questions
- use python codearrow_forwardUsing broadcasting, create a 10 by 10 numpy array where each row is [1.,2.,3.,4.,5.,1.,2.,3.,4.,5.]. Then multiply, with a single statement, the third and fourth rows by 3. Then, again with a single statement, subtract 15 from the ninth and tenth columns.arrow_forwardMotion History Image (MHI) technique uses a frame differencing inside to generate M(t). In its original form SFD is used. Instead of SFD, we can use a) ABS, b) TFD. Write pseudo-code for each case separately.arrow_forward
- Output the value of the tenth element of the array alpha to the screen.arrow_forwardWhat would you do if you want to erase recently drawn straight segments?arrow_forwardUse python to create 1000 x 1000 random square matrix, and save it into a CSV file. Then, read the CSV file and compute the sum of squares of the diagonal elements.arrow_forward
- Please answer IV. V. The question & output in the imagesarrow_forwardpic for input and output pic link: fname = "https://runestone.academy/runestone/static/instructorguide/_static/arch.jpgarrow_forwardno code is needed this is a hand written question Question: You are given the following grays-scale image of size 2x2. Interpolate this image to size 3x3 using Bilinear Interpolation 100 200 80 60arrow_forward
- Use an appropriate loop to print all elements of the array alpha to the screen separated by spaces. Please give the codes.arrow_forwardPlease do not give solution in image format thanku A Bunker array is an array that contains the value 1 if and only if it contains a prime number. The array {7, 6, 10, 1} is a Bunker array because it contains a prime number (7) and also contains a 1. The array {7, 6, 10} is not a Bunker array because it contains a prime number (7) but does not contain a 1. The array {6, 10, 1} is not a Bunker array because it contains a 1 but does not contain a prime number. It is okay if a Bunker array contains more than one value 1 and more than one prime, so the array {3, 7, 1, 8, 1} is a Bunker array (3 and 7 are the primes). Write a function named isBunker that returns 1 if its array argument is a Bunker array and returns 0 otherwise. You may assume the existence of a function named isPrime that returns 1 if its argument is a prime 11 and returns 0 otherwise. You do not have to write isPrime, you can just call it. If you are programming in Java or C#, the function signature is int isBunker(int [ ]…arrow_forwardPart 5: JavaScript - Displaying the Input The next step is to display the user input on the HTML page. The input data is stored in the array, so each element in the array will become a separate line of output on the web page. Eventually, we will ensure the output is all upper case, and that each line of text is a different, random color. Below is an example of the final output, assuming the user input a, b, c, and then finally nothing. To display the output, you will need to use another loop structure: for, while, or do...while. You choose. Before outputting to the browser, first, output to the console to ensure your looping works. >> Use an appropriate loop structure to loop through the input data array, and output each array item to the console. Now that you're working with the data, you might as well make adjustments to ensure each item is now displayed as upper case. >> Make coding changes to display the input data output to the console as all upper case content. Now…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,