Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

edit Ellipsoid : Takes four parameters ( label, a, b, and c ), uses the label to find the corresp onding the Ellipsoid object .

edit

Ellipsoid

: Takes

four

parameters (

label,

a, b, and

c

), uses the label to find the

corresp

onding the

Ellipsoid

object

. If found, sets the

a, b, and c

to the values passed in as

parameters, and returns

the Ellipsoid object

. If not found, returns

null

.

This method

should

not

change the label

.

public boolean editEllipsoid(String labelIN, double aIN, double bIN, double cIN) { Ellipsoid result = null; int index = 0; for (Ellipsoid h : tList) { if (h.getLabel().equalsIgnoreCase(labelIN)) { index = tList.indexOf(h); break; } } if (index >= 0) { findEllipsoid(labelIN).setA(aIN); findEllipsoid(labelIN).setB(bIN); findEllipsoid(labelIN).setC(cIN); return true; } return false; }

my reviewer program says

error: incompatible types: boolean cannot be converted to Ellipsoid Ellipsoid actual = list.editEllipsoid("abcdefg", 1,2,3);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

4. What action should Cherita Howard take and why?

Answered: 1 week ago