Professional Documents
Culture Documents
Alimullah Miyan
Instructions: (1) Answer all the questions. (2) Take a photo or download the question paper as soon as you open it. (3)
Marks allocated are indicated in the right margin. (4) After completing the assignment, take a photo of your answer
script, convert it to PDF and send it to google classroom. (5) You must write your name, ID number and page number on
every page of your answer script. Also, please sign on every page. Write your mobile number on the first page only.
(6)Full assignment should be hand written. (7) If necessary, you may contact your course instructor by phone.
1. Compare and contrast abstract classes and interfaces. Explain with CLO1 10
examples, why you would use an abstract class and why you would use an PO1
interface. C2
CLO2 10
2. Find out the error of the given program and explain how to solve it. PO1
Abstract class Parent { C2
static void m1()
{
System.out.println("From parent "+ "static m1()");
}
Abstract void m2()
{
System.out.println("From parent "+ "non-static(instance) m2()");
}
}
{
System.out.println("From child static m1()");
}
public void m2()
{
System.out.println("From child "+ "non-static(instance) m2()");
}
}
class Main {
public static void main(String[] args)
{
Parent obj1 = new Child();
obj1.m1();
obj2.m2();
}
}
3. Assume you have a savings account in A2Z Bank. After creating the account, you have CO2 10
deposited some amount of money there. You had applied for a debit card and now you have PO1
got it. The bank employee informed you that to activate your account you need to call the C2
customer care. After calling the customer care they ask you some verification questions.
Then they sent you a SMS and asked you to confirm that you got the message without
sharing the pin code. Now by using the pin code you can do the transaction by your debit
card.
The JAVA features you can assume from the given situation give a brief explanation on that
with an example program.
4. Write a Java program that reads and displays information about students registered in CSC- CLO3 20
383.
● Create a class CSC383Student with instance variables including ID, Name, Gender PO2
to represent a student. C3
● The class also holds instance variables including FinalExamMark, MidExamMark,
TermExamMark, AssignmentMark, and AttendanceMark to calculate the
TotalMarks. The values of all these variables are within the range 0-100, inclusively.
● The constructor initializes all the attributes (except FinalMarks) during the creation
of a new object.
● ComputeFinalMarks() method computes the final mark of a CSC383 student and
assigns this value to the instance variable FinalMarks. The following formula is used
to compute the final mark:
TotalMarks=0.3* FinalExamMark+0.25* MidExamMark+0.25*
TermExamMark+0.15* AssignmentMark+0.05*Attendance Mark
● ComputeFinalGrade() method computes the final grade according to the IUBAT
grading system.
● Create a driver or a test class TestCSC383Student to create the CSC383Student
object and print the corresponding students’ grade.
5. Assume that you went shopping with your friends to buy a mobile phone. After selecting CLO2 20
the phone which cost 30000 taka. You are interested to give the payment through a debit PO1
card but unfortunately the card has only 15000 taka limit now you have only one option for C3
payment which is credit card for the rest of the amount because the max limit was 50000
taka. Also some reward points will be added with the previous points.
The JAVA features you can assume from the given situation give a brief explanation on
that with an example program.
6. You are asked to develop a dynamic website. The site should be a blog site where multiple CO3 15
users can create their account and post their blogs. The admin will check the posts and keep PO2
a track about the users. If needed the admin can delete any post or also ban a user for any C4
violation of the rules.
After analyzing the given requirements explain the JAVA OOP features that will be
needed here along with database connection.
7. JavaFX is a Java library used to develop Desktop applications as well as Rich Internet CLO3 15
Applications. As a software developer you are asked to develop an Inventory PO3
Management System by using JavaFX. Now design the feedback form of the customer for C5
this system by adding all the necessary fields of different types with labels.
Create the design in your compiler and take a screenshot and finally attach with the
pdf.
C6-Creating: Builds a structure or pattern from diverse elements. Put parts together to
form a whole, with emphasis on creating a new meaning or structure.