Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 8 0 Chapter 6 Arrays and Array Lists 3 6 . This question is based on the Point class below: public class Point {

280
Chapter 6 Arrays and Array Lists
36. This question is based on the Point class below:
public class Point
{
/** The coordinates. * ereturn the x-coordinate of this point * oreturn the y-coordinate of this point * Set x and y to nev_x and nev_y. Oparam pointMat the matrix of points
Precondition: pointMat is initialized with Point objects.
Postcondition: Every point with at least one negative coordinate
has been changed to have both coordinates
equal to zero.
**
public static void changeliegs (Point [][] pointMat)
{
}
/* code */
Multiple-Choice Questions on Arrays and Array Lists
281
Which is a correct replacement for ??** code */?
I for (int r=0; r pointMat.length; r+b)
for (int c=0;c pointMat r. length; c++)
if (pointhat [r][c], getx()0
II pointMat [r][c]*gety()0 pointMat [r][c], netPoint (0,0);
II for (int c=0;c pointMat [0]. length; c+t)
for (int r=0;r pointMat.length; r++)
1f(pointhat [r][c]*gotx()0
II pointMat [r][c]. gety ()0 pointMat [r][c]. setPoint (0,0) :
III for (Point [] rou : pointMat)
for (Point p : row)
if (p.getx O0 II p.gety
image text in transcribed

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago