Menu

Need Help With That Lab Java Programming Need Help With That Lab Java Programming

0 Comment

Task 1 . Define an elegant class
Design an elegant class for pupils who are good
at arithmetic operations , such as addition
subtraction multiplication , and division . The
data type of operands may be integer or float .
For example , the add methods can be defined as
following . They are overloading methods
pu
PU
blic int add intox into the float addsint x
float y )
public float add float
public float add float
Noat you
int you
return x ty !
return ( float ( x + y )
hell
of properties , constructors and methods of Thi
class Pupil as shown in Figure
PUTHI
TESTING
NEXT
Must be home – kan
Figure I Model for PupilJava Programming