Southeast University: Final Examination Semester: Spring 2023 Program: Computer Science & Engineering
Southeast University: Final Examination Semester: Spring 2023 Program: Computer Science & Engineering
SOUTHEAST UNIVERSITY
Final Examination
Semester: Spring 2023
Course Code: CSE 282/2016 Course Title: Introduction to Programming Language II (Java) LAB
Instructions:
1. Create class Number with only one private instance variable as a double 5
primitive type. To include the following methods (include respective
constructors) isZero( ), isPositive(), isNegative( ), isOdd( ), isEven( ), isPrime(),
isAmstrong() the above methods return boolean primitive type. getFactorial(),
getSqrt(), getSqr(), sumDigits(), getReverse() the above methods return
double primitive type. void listFactor(), void dispBinary().
3. Which class implements factory design pattern? Write the java programs to 5
implement the factory pattern?
4. Write a program to insert data into database. 5