id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

siochi@cnu.edu > isInRect
prev  |  next  |  chance

isInRect() -- given a rectangle whose top left corner is at (tx, ty) and whose bottom right corner is at (bx, by), and a point (x, y), return true if the point is inside the rectangle. A point on the line of the rectangle is considered inside the rectangle. The coordinate system is that used for computer graphics. This is to say, X values increase from left to right, and Y values increase from top to bottom.


isInRect(1, 1, 4, 4, 1, 1) → true
isInRect(1, 1, 4, 4, 1, 4) → true
isInRect(1, 1, 4, 4, 4, 1) → true

...Save, Compile, Run (ctrl-enter)

public boolean isInRect(int tx, int ty, int bx, int by, int x, int y) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 170 Post-solution available

Copyright Nick Parlante 2017 - privacy