Professional Documents
Culture Documents
Quiz 1: Oop Lab: 1 Task
Quiz 1: Oop Lab: 1 Task
OOP LAB
Dr. Muhammad Safyan
Atif Ishaq
Muhammad Asjid
29 June 2020
1 Task
Implement the following class diagram in the provided .java files.
• Products array in bill class can be a array of ten elements or you can take
an arraylist.
• the date variable of bill class will be initialized in constructor
• calculate billmethod will calculate the bill by multiplying pricePerUnit
of each product in products array with its quantity
1
• the display method of bill class will display all the products, date ,and
total bill.
• if you want to add some extra attributes like customer name etc, you can
add them
2 Main
in main method create a bill class object add three products in it and then
display the bill
you can also take input form user(if you want to it is not compulsory).
3 Submission guidelines
• Your files should be renamed be as:
– XXX-product.java
– XXX-bill.java
• At the top of the every file there is a comment fill it appropriately
• if you have made any assumptions write it in comments.
• you code should be properly formatted with appropriate comments.