

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is an Introductory course of Java Web Programming focusing on writing maintainable extensible code, methods of debugging, logging and profiling. The Java Technology used is J2EE an Enterprise Application Development tool. This lab manual includes: Number, Calculator, Generic, Class, Addition, Subtraction, Multiplication, Division, Java, Code
Typology: Lecture notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


/**
public abstract class GenericNumberCalculator
abstract public E subtract(E num1, E num2);
abstract public E multiply(E num1, E num2);
abstract public E divide(E num1, E num2);
}
class NumberCalculator extends GenericNumberCalculator
public Number subtract(Number num1, Number num2) { return (num1.doubleValue() - num2.doubleValue()); }
public Number multiply(Number num1, Number num2) { return (num1.doubleValue() * num2.doubleValue()); }
public Number divide(Number num1, Number num2) {
return (num1.doubleValue()/num2.doubleValue()); } }