Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary university algorithme

Rating
-
Sold
-
Pages
1
Uploaded on
02-09-2025
Written in
2024/2025

“This collection of documents covers essential courses in Computer Science and Mathematics for first-year university students. It includes lecture notes, detailed summaries, solved exercises, and past exam questions. The materials explain topics clearly, from algorithms, programming, and data structures to calculus, linear algebra, and statistics. Designed to help students save time, understand key concepts, and prepare effectively for exams, these resources are perfect for Blida University students and anyone studying in similar programs.”

Show more Read less
Institution
Course

Content preview

Abdelhamid Mehri Constantine 2 University

NTIC Faculty L1/S2 2023–2024

Introduction to Object-Oriented Programming

Lab 4

(Inheritance, Abstract Classes/Methods, ArrayList)

We want to create a property management system using inheritance and abstract classes/methods in Java.
We want to create two packages containing the following classes: Person, Owner, Tenant,
Accommodation, Villa, Apartment, Studio, Deed, Sale, and Rental.

1. Create an abstract class Person which contains the attributes (name, firstName, and address) and the
abstract methods buy() and rent().
2. Create two classes Owner and Tenant that inherit from the Person class. The Owner class contains an
additional attribute properties which will be a list of Accommodation objects. The Tenant class
contains an additional attribute rentals which will be a list of Accommodation objects.
3. Create an abstract class Accommodation which contains the attributes (address, area, and
numberRooms) and the abstract methods sell() and rent().
4. Create three classes Villa, Apartment, and Studio that inherit from the Accommodation class. The
Villa class contains an additional attribute garden, the Apartment class contains an additional
attribute floor, and the Studio class contains an additional attribute kitchenette.
5. Create an abstract class Deed which contains the attributes (accommodation, owner, client, and date)
and the abstract methods sign() and cancel().
6. Create two classes Sale and Rental that inherit from the Deed class. The Sale class contains an
additional attribute price. The Rental class contains additional attributes (startDate, endDate, rent).
7. Create a class containing the main method that constructs objects of each class and performs method
calls to test the property management system. Use arrays of objects and then ArrayList structures to
manipulate objects of the same class.

Written for

Course

Document information

Uploaded on
September 2, 2025
Number of pages
1
Written in
2024/2025
Type
SUMMARY

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chaimabenyouci

Get to know the seller

Seller avatar
chaimabenyouci informatique
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
8 months
Number of followers
0
Documents
15
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions