Professional Documents
Culture Documents
Kuis 1 Lenni
Kuis 1 Lenni
Assignment Case
ISYS6197
Business Application Development
Computer Science O213-ISYS6197-BD01-01
2. Jika mahasiswa terbukti melakukan tindakan seperti yang dijelaskan butir 1 di atas, maka nilai
mahasiswa yang melakukan kecurangan (menyontek maupun dicontek) akan di – NOL – kan.
If the student is proved to the actions described in point 1 above, the score of the student which committed dishonest acts (cheating
or being cheated) will be “Zero”
3. Perhatikan jadwal pengumpulan jawaban, segala jenis pengumpulan jawaban di luar jadwal tidak
dilayani.
Pay attention to the submission schedule, all kinds of submission outside the schedule will not be accepted
Software
Software
Java 8
Eclipse 2020.6
XAMPP 7.4.7
MySQL Java Connection Library 5.1.49
Page 1 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
6. Ekstensi file yang harus disertakan dalam pengumpulan tugas mandiri dan proyek untuk
matakuliah ini adalah sebagai berikut:
File extensions should be included in assignment and project collection for this subject are described as follows:
Page 2 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
Soal
Case
Bluejack Market
Criteria:
1. Abstract Class
You need to design at least three classes, one abstract class, and two concrete classes. Abstract
class consists of all common attributes and behavior that both of concrete class had. Concrete
class consist of specific attribute and behavior that not common between the concrete classes
2. Encapsulation
To hide the data of a class from an illegal direct access, all of the attributes of the class must be
encapsulated and will be accessed using an accessor and mutator that may perform validation
before accessing the encapsulated attribute
3. Inheritance
All of the concrete class must inherit all attribute and behavior from the abstract class
4. Polymorphism
If the concrete class has a specific implementation of the inherited behavior (method) that differ
from the abstract class, the concrete class can override or overload the behavior from the abstract
class
Bluejack Market is an online market where you can buy groceries to cook at home. As a good
programmer, you must make this program based on the following criteria:
Page 3 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
At the start of the application, the user will be shown 4 menus (Add Cart, View Cart(s), Delete
Cart, Exit).
1. Add Cart
The first menu option will let the user to add a Food into the Cart. This option requires the user to
input some information regarding the food with following detail:
You will be asked to input the Food’s Type. Validate the Food’s Type must be either Meat or
Vegetable (case sensitive)
You will be asked to input the Food’s Name. Validate the Food’s Name must be between 3
and 18 characters long
You will be asked to input the Food’s Price per Unit. Validate the Food’s Price per Unit must
be more than 0 and a multiple of 1000
Page 4 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
You will be asked to input the Food’s Freshness Level. Validate the Food’s Freshness Level
value must be between 1 and 5
Depending on Food’s Type you choose, you will be asked for different input
o If you choose Meat, then:
You will be asked to input the Meat’s Weight. The weight can be a decimal number.
Validate the Meat’s Weight must be more than 0,0
You will be asked to input the Meat’s Thickness. The thickness can be a decimal
number. Validate the Meat’s Thickness must be more than 0,0
After that you are tasked to generate an ID for the newly added food. The Food ID will start
from 1 and will be increased by 1 for each newly added food.
After you have finished inputting all the required input you will be shown a success message
alongside the generated ID with it
Page 5 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
2. View Cart(s)
The second menu allows you to view all the foods in the cart. The process follows the following
steps which are:
Check if there are any foods in the cart. If there are no foods in the cart, then show an error
message
If there are foods in the cart, show all information regarding the foods in the cart such as ID,
Type (Meat or Vegetable), Name, Price per Unit, and Freshness Level. If the food is a
Meat, then show its Weight and Thickness. If the food is a Vegetable, then show its
Quantity.
For every food in the cart, you also need to show its subtotal. You will be asked to create an
abstract method to calculate the subtotal of each Food in the Superclass and will be
overridden by the Subclass. Calculation formula for Meat and Vegetable will be different.
Below are the formulas:
Meat:
Price per unit * (Weight + (Thickness * 0.5))
Vegetable:
(Price per unit * Quantity)
After showing the information of each Food, show the grand total of all items by adding the
subtotals.
Page 6 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
3. Delete Cart
The third option allows you to Delete a Food in the cart. The process follows the following steps
which are:
Check if there are any foods in the cart. If there are no foods in the cart, then show an error
message.
If there are foods in the cart, show all information regarding the food followed by its food
number based on the order of the food. Food number will start from 1. Note that food
number is different from food ID
You will be asked to input the food number you want to delete. Validate the input must be
ranging from 1 to the amount of foods there are in the cart.
Page 7 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
140920 FM-BINUS-AA-FPT-66/R7
After that the program will show a success message with deleted food id.
4. Exit
The program will exit.
Page 8 of 8
This study source was downloaded by 100000855255110 from CourseHero.com on 10-21-2022 02:07:33 GMT -05:00
https://www.coursehero.com/file/80348286/kuis-1-lennidocx/
Powered by TCPDF (www.tcpdf.org)