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
Why this code in the picture has 3 spaces?
how many spaces print out the statement on the picture?
Put up screenshot with code
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage