0% found this document useful (0 votes)
25 views2 pages

Task 3

The document outlines a lab task for a Java programming course at American International University-Bangladesh, focusing on Object Oriented Programming concepts such as inheritance, association, polymorphism, abstraction, and interfaces. It includes a class diagram and specifications for classes related to books, including StoryBook and TextBook, along with operations for managing a bookshop. Students are required to create instances of these classes and demonstrate their functionality in a main method.

Uploaded by

sabujp514
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)
25 views2 pages

Task 3

The document outlines a lab task for a Java programming course at American International University-Bangladesh, focusing on Object Oriented Programming concepts such as inheritance, association, polymorphism, abstraction, and interfaces. It includes a class diagram and specifications for classes related to books, including StoryBook and TextBook, along with operations for managing a bookshop. Students are required to create instances of these classes and demonstrate their functionality in a main method.

Uploaded by

sabujp514
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/ 2

AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH

(AIUB)
Faculty of Science and Technology (FST)
Department of Computer Science (CS)

Course Title : CSC1205: Object Oriented Programming 1 (JAVA)

Developing a basic Java program with Inheritance, Association, Polymorphism,


Lab Task – 8 :
Abstraction and Interface.

Look at the following class notations and class diagram carefully, and develop the program.
American International University-Bangladesh (AIUB)

BookShopOperations BookOperations

StoryBook
BookShop Book

TextBook

Class Diagram

Book

String isbn
String bookTitle
String authorName
double price
int availableQuantity
Book( )
Book(String isbn, String bookTitle, String authorName, double price, int availableQuantity)
void setIsbn(String isbn)
void setBookTitle(String bookTitle)
void setAuthorName(String authorName)
void setPrice(double price)
void setAvaiableQuantity(int availableQuantity)
String getIsbn( )
String getBookTitle( )
String getAuthorName( )
double getPrice( )
int getAvailableQuantity( )
abstract void showDetails( )
StoryBook

String category
StoryBook( )
StoryBook(String isbn, String bookTitle, String authorName, double price, int availableQuantity,
String category)
void setCategory(String category)
String getCategory( )

TextBook
American International University-Bangladesh (AIUB)

int standard
TextBook( )
TextBook(String isbn, String bookTitle, String authorName, double price, int availableQuantity,
int standard)
void setStandard(int standard)
int getStandard( )

BookShop
String name
Book listOfBooks[ ] //size of array should be 100.
BookShop( )
BookShop(String name)
void setName(String name)
String getName( )

BookOperations

void addQuantity(int amount)


void sellQuantity(int amount)

BookShopOperations
boolean insertBook(Book b)
boolean removeBook(Book b)
void showAllBooks( )
Book searchBook(String isbn)

Start

The Start class contains the main method. Inside the main method, create Five objects of
StoryBook, Five objects of TextBook and One object of BookShop. Demonstrate all the methods
and constructors.

You might also like