Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
6th Edition
ISBN: 9780134477367
Author: David J. Barnes, Michael Kolling
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 1, Problem 1E

Explanation of Solution

Given: The class names such as Circle, Square, Triangle, Person, and Canvas.

To find: The possible way to create another circle and then a square.

Solution:

Start BlueJ and open a new project named figures.

A new window will appear on the screen in which each rectangular block will represent a class.

In order to create an object of Circle class, it is necessary for the user to right click on the Circle class and then click on the new Circle() from the pop-up menu. The user can provide a specific name of the instance and then click ok button.

A new red rectangle will appear at the bottom of the BlueJ screen labeled with the name of the instance provided by the user.

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  1

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  2

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  3

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  4

In order to create an object of Square class, it is necessary for the user to right click on the Square class and then click on the new Square() from the pop-up menu. The user will be prompt to provide a specific name of the instance and then click ok button.

Another red rectangle will appear at the bottom of the BlueJ screen labeled with the name of the instance provided by the user.

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  5

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  6

Objects First with Java: A Practical Introduction Using BlueJ (6th Edition), Chapter 1, Problem 1E , additional homework tip  7

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
how many spaces print out the statement on the picture?
Exercise#2: Calculate the area and perimeter of right angled triangle.
Create the design for determining if a point is inside, on, or outside of the rectangle. Drawing out the rectangle and labeling the coordinates of all points will help you to visualize the problem. Once the design has been completed, write a program that prompts the user for the x and y coordinates for the lower left hand corner of a rectangle as well as the height and the width of the rectangle. After that, you will need to get the coordinates for the point from the user as well. Once all inputs have been entered by the user, determine if the point is inside the rectangle, on the rectangle, or outside the rectangle. If the point is inside the rectangle, print "inside the rectangle". If the point is on the rectangle, print "on the rectangle". If the point is outside of the rectangle, print "outside the rectangle". Example output: Enter the x coordinate of the lower left hand corner of the rectangle: 1 Enter the y coordinate of the lower left hand corner of the rectangle: 1 Enter the…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education