Assignment 1 FC-340 PDF
Document Details
Uploaded by Deleted User
National University of Modern Languages
NUML
Sabat Ali
Tags
Related
- Object-Oriented Programming, Lecture 06 PDF
- Object-Oriented Programming (OOP) Notes PDF
- 01 Dart Genel Bakış ve İleri Nesne Yönelimli Programlama (PDF)
- CSC435 Object-Oriented Programming Introduction PDF
- CCS0023 OBJECT ORIENTED PROGRAMMING Past Paper PDF
- Introduction To Object Oriented Programming PDF
Summary
This is an OOP programming assignment for a vehicle management system and e-commerce system, focusing on object-oriented programming concepts. It includes questions on creating classes, methods, and objects related to cars, trucks, and various product categories like clothing and electronics.
Full Transcript
National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP Name Sabat Ali Roll No FC-340 Assignment...
National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP Name Sabat Ali Roll No FC-340 Assignment 01 Class OPP Assignment 01 Question # 01: You're developing a vehicle management system where the base class Vehicle has common properties like engineType and capacity and method Displayinfo which will print the vehicle information. There are two child classes: Car, which adds the method getNumberOfDoors() which prints the number of doors car has, and Truck, which adds the method getLoadCapacity() to print the load capacity. Car has one subclass “SUV” which has its own attribute “color” and method CarInformation(). National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP Question # 02: You're building an e-commerce system where the base class Product has common properties like productName, price, and stock. From this base class, you need to create three specific product categories: Electronics with an extra property called warranty. Clothing with an additional property called size. FoodProduct with an extra property called expirationDate. Each category should also have its own method for displaying these specific details, while keeping the common product details from Product. National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP National University of Modern Languages (NUML) BS(CS) 2nd Semester CSOO 122L: OOP