Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package data;
- public class Interval {
- private float inf; //estremo inferiore
- private float sup; //estremo superiore
- Interval(float inf, float sup) {
- this.inf = inf;
- this.sup = sup;
- }
- void setInf(float inf) {
- this.inf= inf;
- }
- void setSup(float sup) {
- this.sup=sup;
- }
- float getInf() {
- return inf;
- }
- float getSup() {
- return sup;
- }
- boolean checkValueInclusion(float value) {
- if(value>=this.inf & value<=this.sup) {
- return true;
- }
- else {
- return false;
- }
- }
- public String toString() {
- String x = this.getInf() + " " + this.getSup();
- return x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement