
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
![1. Given the following Java code that paints this image, select the third vertex of the border that
is painted.
int[] x = (16, 22, 28, 30, 24, 10);
int[] y (22, 20, 26, 18, 12, 12);
g.setColor (new Color (17, 242, 44));
g. fill Poly (x, y, 6);
=
g.setColor (Color.BLACK);
g.drawPoly (x, y, 6);
A. (24,12)
B. (30,18)
C. (10,12)
D. (28,26)
2. What must be imported to get most graphics components?
A. 250,00,250
B. 255,0,255
C. 255,00,255
D. 250,0,250
An alternative Java statement that achieves exactly the same effect is:
getContent Pane ().setBackground (new Color (--,--,--))
A. g.fillOval(20, 30, 35, 60);
B. g.fillOval (20, 30, 60, 35);
C. g.fillOval (35, 60, 20, 30);
D. g.fillOval(20, 30, 35, 60);
(10,12)
A. java.Graphics
B. java.awt.*
C. java.util.
D. java.*
3. To set the background colour of a JApplet or a JFrame, the following Java statement could
be used:
getContent Pane ().setBackground (new Color (0xff00ff));
4. Which of the painting statements would produce the oval shown in this image?
You can assume that the drawing colour has already been set to red
(20,30)
6. How many access modifiers are available in java?
(16,22)
A. 1
60
Û
136
A. Focus only on high-level details
B. Focus on low-level details at the appropriate time
C. Focus on low-level details first
D. Gives a good overview because low-level information is missing
35
(24,12)
5. The following statements correctly describe benefits of the technique called abstraction
except?
(30,18)
(28,26)
-...1/8
а](https://content.bartleby.com/qna-images/question/fd2e128d-49d1-435e-9b19-2cd050c7df8b/ba6e0013-02ca-48ed-b603-d909d0dde736/pe6d89e_thumbnail.jpeg)
Transcribed Image Text:1. Given the following Java code that paints this image, select the third vertex of the border that
is painted.
int[] x = (16, 22, 28, 30, 24, 10);
int[] y (22, 20, 26, 18, 12, 12);
g.setColor (new Color (17, 242, 44));
g. fill Poly (x, y, 6);
=
g.setColor (Color.BLACK);
g.drawPoly (x, y, 6);
A. (24,12)
B. (30,18)
C. (10,12)
D. (28,26)
2. What must be imported to get most graphics components?
A. 250,00,250
B. 255,0,255
C. 255,00,255
D. 250,0,250
An alternative Java statement that achieves exactly the same effect is:
getContent Pane ().setBackground (new Color (--,--,--))
A. g.fillOval(20, 30, 35, 60);
B. g.fillOval (20, 30, 60, 35);
C. g.fillOval (35, 60, 20, 30);
D. g.fillOval(20, 30, 35, 60);
(10,12)
A. java.Graphics
B. java.awt.*
C. java.util.
D. java.*
3. To set the background colour of a JApplet or a JFrame, the following Java statement could
be used:
getContent Pane ().setBackground (new Color (0xff00ff));
4. Which of the painting statements would produce the oval shown in this image?
You can assume that the drawing colour has already been set to red
(20,30)
6. How many access modifiers are available in java?
(16,22)
A. 1
60
Û
136
A. Focus only on high-level details
B. Focus on low-level details at the appropriate time
C. Focus on low-level details first
D. Gives a good overview because low-level information is missing
35
(24,12)
5. The following statements correctly describe benefits of the technique called abstraction
except?
(30,18)
(28,26)
-...1/8
а
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- IN JAVA Given an array, write a program to print the array elements one by one in a new line. If the array element is divisible by 4, print Four. If it is divisible by 6, print Six. If it is divisible by both 4 and 6, print Four Six. Use the following input array Int[] input_array = {2, 5, 10, 8, 18, 24, 3, 48, 30, 9, 12} Output should be 2 5 10 Four Six Four Six 3 Four Six Six 9 Four Sixarrow_forwardJavaarrow_forwardin javaarrow_forward
- Java Given main(), complete the SongNode class to include the printSongInfo() method. Then write the Playlist class' printPlaylist() method to print all songs in the playlist. DO NOT print the dummy head node.arrow_forwardnew JAVA code can only be added between lines 15 and 17. as seen in image.arrow_forwardcanMove(int x, int y, int destX, int destY, Side s): This method returns true if the player of color s can move the piece at coordinates (x,y) can move to coordinates (destX, destY) on the board in its current state. This means that here you do need to consider this piece’s interaction with other pieces on the board. Conditions for this method to return false are given in the code. public boolean canMove(int x, int y, int destX, int destY, Side s){ /* TODO write a method that checks if a piece at coordinates x,y can move to coordinates destX,destY Conditions for false: - Origin or destination coordinates are outside the board - Piece at origin is null - If source and destination coordinates are the same - Piece at origin is not of the same side as s - You can check this using piece.getSide() - Piece cannot move to the destination by piece movement rules - You should check this using Piece.canMove(destX,…arrow_forward
- A popular word game involves finding words from a grid of randomly generatedletters. Words must be at least three letters long and formed from adjoining letters.Letters may not be reused and it is valid to move across diagonals. As an example,consider the following 4 * 4 grid of letters: A B C DE F G HI J K LM N O P The word “FAB” is valid (letters in the upper left corner) and the word “KNIFE”is valid. The word “BABE” is not valid because the “B” may not be reused. Theword “MINE” is not valid because the “E” is not adjacent to the “N”. Write a program that uses a 4 * 4 two-dimensional array to represent the gameboard. The program should randomly select letters for the board. You may wishto select vowels with a higher probability than consonants. You may also wish toalways place a “U” next to a “Q” or to treat “QU” as a single letter. The programshould read the words from the text file words.txt (included on the website withthis book) and then use a recursive algorithm to…arrow_forwardThis code is for java see image thank youarrow_forwardimplement changeArrayLength(int m) – void method; public class Course { public String code; public int capacity; public SLinkedList<Student>[] studentTable; public int size; public SLinkedList<Student> waitlist; public Course(String code) { this.code = code; this.studentTable = new SLinkedList[10]; this.size = 0; this.waitlist = new SLinkedList<Student>(); this.capacity = 10; } public Course(String code, int capacity) { this.code = code; this.studentTable = new SLinkedList[capacity]; this.size = 0; this.waitlist = new SLinkedList<>(); this.capacity = capacity; } public void changeArrayLength(int m) { // insert your solution here } This method creates a new student table for this course; this new table has the given length m; the method moves all registered students to this table, as described in more detail below. Note that this method itself…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education