Object Oriented Programming
SWE · Lab Midterm · Summer 26 · 3 views
Paper 1 of 2By Md. Mehedi Hasan 251-35-322 (1)Switch
shared by Md. Mehedi Hasan 251-35-322
Paper 1 of 2Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Faculty of Science & Information Technology
Department of Software Engineering
Course Code: SE 217; Course Title: Object Oriented Programming Lab
Question 4: Courier Delivery Service
A courier company delivers different types of packages. Every package contains a tracking number, receiver name, and weight (kg).
The company provides three delivery services:
• StandardDelivery – Charge = Weight × BDT 50
• ExpressDelivery – Charge = Weight × BDT 80 + BDT 200 service fee
• InternationalDelivery – Charge = Weight × BDT 150 + BDT 1,000 customs fee
Requirements
1. Create a superclass Package.
2. Create subclasses StandardDelivery, ExpressDelivery, and InternationalDelivery.
3. Override the method calculateDeliveryCharge().
4. Implement a method displayPackageInfo().
5. In the main() method:
o Create 3 objects of each delivery type.
o Calculate and display the delivery charge using runtime polymorphism.
Lab Evaluation Instructions
• Write the Java code in your IDE (e.g., IntelliJ IDEA, Eclipse, or NetBeans).
• Compile and run the program.
• Open a new Microsoft Word document.
• Take clear screenshots of:
o The complete Java source code.
o The program output.
• Paste both screenshots into the Word document and make it pdf.
• Save the document using the format: StudentID(Last 3 digit)_Name.pdf. [211_Mehedi.pdf]
• Upload the pdf to BLC before the submission deadline.