PROGRAMMING CONCEPTS:
Week 12 Activity
Group Project Task List
Student Name Student Id Role
Israel E.A. Korwa 001202300225 Team Leader
Rayvangga chayen salindeho 00168394902 Member 1
Reza rahmat saputra 00168394989 Member 2
Karaka Clothing
Chapter 1: Introduction
The KarakaClothing program is designed to provide a simple and interactive shopping
experience for T-shirts. This Java-based application allows users to browse through a menu
of available T-shirts, make purchases, view payment history, and exit the program. The goal
is to create a user-friendly platform that facilitates the buying process while maintaining a
clear and organized structure.
Enable user to choose purchase actions
- Enable user to choose T-shirt
- Enable user to re-entry if wrong input is given - Enable to choose the exit option
- Enable to input name
Chapter 2. Flowchart
Chapter 3: The Program
Line Code
1 package CLOTHING;
2
import [Link];
3
public class KarakaClothing {
4 public static void main(String[] args) {
5 Scanner scanner = new Scanner([Link]);
6 String[] menu = {"ERIGO", "ADIDAS", "New Balance",};
7 double[] prices = {100000, 160000, 155000, };
8 boolean[] selectedTshirt = new boolean[[Link]];
9 StringBuilder paymentHistory = new StringBuilder();
[Link]("Welcome to the KarakaClothing Shop!");
10
int option = 0;
11 while (option != 3) {
12 [Link]("\nMenu:");
13 [Link]("1. Buy Tshirt");
14 [Link]("2. Payment History");
[Link]("3. Exit");
15 [Link]("Enter your choice: ");
16 while (![Link]()) {
[Link]("Invalid input. Please
17
enter a number.");
18 [Link]("Enter your choice: ");
19 [Link](); // consume the invalid input
20 }
21 option = [Link]();
22 switch (option) {
23 case 1:
char choice = 'y';
24
while (choice == 'y' || choice == 'Y') {
25 [Link]("\nTshirt Menu:");
26 int i = 0;
27 while (i < [Link]) {
28 [Link]((i + 1) + ".
29 " + menu[i] + " - Rp" + prices[i]);
i++;
30
}
31 [Link]("Enter your name: ");
32 [Link](); // consume the
33 newline character
34 String customerName =
35 [Link]();
36 int tshirtNumber;
while (true) {
37
[Link]("Enter the
38 number of the Tshirt you want to buy: ");
39 while (![Link]()) {
40
41 [Link]("Invalid input. Please enter a valid Tshirt
42 number.");
[Link](); // consume
43
the invalid input
44 }
45 tshirtNumber =
46 [Link]();if (tshirtNumber >= 1 && tshirtNumber <=
47 [Link]) {
48 break;
49 } else {
50 [Link]("Invalid input. Please enter a valid Tshirt
51 number.");
52 }
53 }
54 int quantity;
55 while (true) {
[Link]("Enter the
56
quantity you want to buy: ");
57 while (![Link]()) {
58
59 [Link]("Invalid input. Please enter a valid
60 quantity.");
61 [Link](); // consume
62 the invalid input
}
63 quantity = [Link]();
64 if (quantity > 0) {
65 break;
66 } else {
67
[Link]("Invalid input. Please enter a valid
68
quantity.");
69 }
70 }
71 selectedTshirt[tshirtNumber - 1] =
72 true;
73 [Link]("Customer:
74 ").append(customerName).append("\n");
[Link]("Tshirt:
75
").append(menu[tshirtNumber - 1]).append(" -
76 Rp").append(prices[tshirtNumber - 1]).append("\n");
77 [Link]("Quantity:
78 ").append(quantity).append("\n");
79 double totalPrice =
80 prices[tshirtNumber - 1] * quantity;
[Link]("Total Price:
81
$").append(totalPrice).append("\n\n");
82 [Link](menu[tshirtNumber -
83 1] + " (Quantity: " + quantity + ") added to your selection!");
84 [Link]("Do you want to buy
85 more Tshirt? (y/n): ");
86 choice = [Link]().charAt(0);
87 }
break;
88
case 2:
89 [Link]("Payment History:\n" +
90 [Link]());
91 break;
92 case 3:
93 [Link]("\nThank you for Buy on
KarakaClothhig !");
94
break;
95 default:
96 [Link]("Invalid choice. Please
97 enter a valid option.");
98 }
}
[Link]();
}
}
Chapter 4: The Screenshot
Then, list potential features that you and your team can develop as a case study
- Enable user to select multiple T-shirt
- Enable user for a re-entry if wrong input is given
- Enable the user to receive the total amount to be paid
- Enable user to pay with 100.000 bills. 50.000 bills,
Chapter 5: Requirement checks
No Requirements Yes/No, Line No X - Y
1 Have at least one if / if-else and Yes, line number 25-34
one nested if-else
2 Have at least one while and one Yes, line number 28-30
nested while
3 Have at least one 1 Dimensional Yes, line number 7-8
Array
4 Have at least one mathematical Yes, line number 69
operator calculation
5 Have at least one Boolean Yes, line number 64
expression
Chapter 6: Log Hours
1. Israel ezra Augustine korwa:
- Research Concept: 2 hours
- Program Development: 6 hours
- Testing and Debugging: 3.5 hours
- Reporting: 1.5 hour
- Total: 13 hours
2. Rayvangga chayen salindeho:
- Research Concept: 3hours
- Program Development: 4 hours
- Testing and Debugging: 3 hours
- Reporting: 2 hour
- Total: 12 hours
3. Reza rahmat saputra:
- Research Concept: 4 hours
- Program Development: 3 hour
- Testing and Debugging: 2.5 hours
- Reporting: 3 hrs
- Total: 12.5 hours