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
Use the given Java code on the left side of the photo:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Similar questions
- Please code in java and dont use extremely advanced methods, please dont make change in the code .. edit from where it is mentionedWrite a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the value is less than or equal to the second integer. For coding simplicity, output a space after every integer, including the last. PLEASE CORRECT THE ERROR IN THE IMAGES PROVIDED . THE YELLOW ARROWarrow_forwardIn your own words, what is encapsulation?arrow_forwardPlease draw the Olympic Rings. You can output many stars (*) to form a rings, but the parameter of the rings should be adjustable,(Please code without using Graphics . Note:there are already some answers here which are not drawing the real olympic rings without using Graphics )arrow_forward
- In your own words, what is encapsulation?arrow_forwardPlease add a line(s) of code to the java code below. And comment the java code. Refer to image below and show output of the sierpenski triangle import java.awt.Color;import java.awt.Graphics;import javax.swing.JFrame; public class SierpinskiTriangle extends JFrame { public SierpinskiTriangle() { setTitle("Sierpinski Triangle"); setSize(1000,1000); setVisible(true); setDefaultCloseOperation(EXIT_ON_CLOSE); } public void paint(Graphics g) { g.setColor(Color.BLUE); sierpinski(g, 500, 250, 500); } public void sierpinski(Graphics g, int x1, int y1, int side) { int x2 = x1 + side; int x3 = x1 + side / 2; int y2 = y1 - (int) (Math.sqrt(3.0) / 2.0 * side); int y3 = y1 + (int) (Math.sqrt(3.0) / 2.0 * side); if (side < 10) { g.drawLine(x1, y1, x2, y1); g.drawLine(x2, y1, x3, y2); g.drawLine(x3, y2, x1, y1); } else { sierpinski(g, x1, y1, side / 2);…arrow_forwardI need help writing a program using the DrawingPanel that contains a method for drawing a checkerboard. The checkerboard should be 160 units wide (and tall) and should have an input parameters that allow the method to place the checkerboard at any x and y coordinates. For example you should be able to do the following in your main program.drawCheckerboard(100,100, myG);drawCheckerboard(120,500, myG);To draw two different checkerboards.You may choose your own colors for the squares on the checkerboard.arrow_forward
- USE JOptionPane Create a java program to compute the area and perimeter of a rectangle given thelength and width (in centimeters). Output the area in sq. cm.; sq. m.; sq. in.; and sq. ft.For perimeter in cm.; m.; in.; and ft. Use JOptionPane to get input from the user and to output the result in message box. The image attached is the sample layout of output but using JOptionPane. Don't answer if you don't read the instruction. Thanks.arrow_forwardCan you make the triangle that is on top a different color other then red pleasearrow_forwardOutput the numbers 1-100 inclusive starting with 1. Please a comma and a space after each number except the last. Output a new line after the last number. Write a code in Java that results like test case 1arrow_forward
- Please use 6.7 to answer 6.10. Please sent the screenshoots of the program. Please also only answer 6.10.arrow_forwardHow can I find the area of triangle without using all three sides. You can only use 2 side and angle between them in javaarrow_forwardI need help with the Java code so that it can output as shown in the image below: Input is a csv file like this - (The csv file is : 16:40,Wonders of the World,G 20:00,Wonders of the World,G 19:00,Journey to Space ,PG-13 12:45,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG 15:00,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG 19:30,Buffalo Bill And The Indians or Sitting Bull's History Lesson,PG 10:00,Adventures of Lewis and Clark,PG-13 14:30,Adventures of Lewis and Clark,PG-13 19:00,Halloween,R ) The code the I need help fixing: import java.util.Scanner;import java.io.FileInputStream;import java.io.IOException; public class LabProgram { public static void main(String[] args) throws IOException { Scanner scnr = new Scanner(System.in); // Read the file name from the user String fileName = scnr.nextLine(); // Open the CSV file try (Scanner fileScanner = new Scanner(new FileInputStream(fileName))) {…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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