You are on page 1of 8

140920 FM-BINUS-AA-FPT-66/R7

Assignment Case
ISYS6197
Business Application Development
Computer Science O213-ISYS6197-BD01-01

Valid on Odd Semester Year 2020/2021 Revision 00

1. Seluruh mahasiswa tidak diperkenankan untuk:


All students are not allowed to:
1 Melihat sebagian atau seluruh jawaban mahasiswa lain,
Seeing a part or the whole answer from other student
2 Menyadur sebagian maupun seluruh jawaban dari buku,
Adapted a part or the whole answer from the book
3 Mendownload sebagian maupun seluruh jawaban dari internet,
Downloading a part or the whole answer from the internet,
4 Mengerjakan soal yang tidak sesuai dengan tema yang ada di soal,
Working with another theme which is not in accordance with the existing theme in the matter of the case,
5 Melakukan tindakan kecurangan lainnya,
Committing other dishonest actions,
6 Secara sengaja maupun tidak sengaja melakukan segala tindakan kelalaian yang
menyebabkan hasil karyanya berhasil dicontek oleh orang lain / kelompok lain.
Accidentally or intentionally conduct any failure action that cause the results of the project was copied by someone else / other
groups.

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

4. Persentase penilaiaan untuk matakuliah ini adalah sebagai berikut:


Marking percentage for this subject is described as follows:

Tugas Mandiri Proyek UAP


Assignment Project Final Exam
40% 60% -

5. Software yang digunakan pada matakuliah ini adalah sebagai berikut:


Software will be used in this subject are described as follows:

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:

Tugas Mandiri Proyek UAP


Assignment Project Final Exam

JAVA, CLASS JAVA, CLASS, SQL -

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).

Figure 1. Main Menu

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)

Figure 2. Food Type input

 You will be asked to input the Food’s Name. Validate the Food’s Name must be between 3
and 18 characters long

Figure 3. Food Name input

 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

Figure 4. Food Price per Unit Input

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

Figure 5. Food Freshness Level Input

 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

Figure 6. Food Weight input

 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

Figure 7. Food Thickness input

o If you choose Vegetable, then:


 You will be asked to input the Food’s Quantity. The Food’s Quantity must be more
than 0

Figure 8. Food Quantity input

 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

Figure 9. Success Message

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

Figure 10. Empty cart 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

Figure 11. View cart

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.

Figure 12. Delete validation

 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

Figure 13. Delete view

Figure 14. Input validation

 After that the program will show a success message with deleted food id.

Figure 15. Delete success message

4. Exit
The program will exit.

If there are any problems, please ask your assistant!

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)

You might also like