0% found this document useful (0 votes)
19 views1 page

Southeast University: Final Examination Semester: Spring 2023 Program: Computer Science & Engineering

Uploaded by

bossnaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Southeast University: Final Examination Semester: Spring 2023 Program: Computer Science & Engineering

Uploaded by

bossnaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SET A

SOUTHEAST UNIVERSITY
Final Examination
Semester: Spring 2023

Program: Computer Science & Engineering

Course Code: CSE 282/2016 Course Title: Introduction to Programming Language II (Java) LAB

Instructions:

• Answer all question consecutively.


• Examinees are not allowed to carry any book/note/written/printed document in the examination hall.
• Examinees are not allowed to carry mobile phone(s) in the examination hall.

Answer all questions: (5x4=20) Marks

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().

2. Write a program to create interface A in this interface we have two method 5


meth1 and meth2. Implements this interface in another class named MyClass.

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

You might also like