Professional Documents
Culture Documents
Uts PDM
Uts PDM
2602119915
Problem 1
Mr. Sani wants to make a website for his grocery stores. He thinks that by creating a website,
more people will come to buy from his grocery stores. Furthermore, a website does not
require office and other typical equipment or building as in offline stores, which in some
cases might be more expensive.
He then come to a software development agency, which coincidentally is where you are
working currently. Mr. Sani then orders the company to build the website. The company then
calls an internal meeting where you will attend. Before attending the company’s meeting,
these are the questions and materials that you have to prepare:
a) How many modules that the website will needs and in total how many? (LO 1.1) (15
points)
b) Give reasons why modules on point a are needed? (LO 1.2) (20 points)
c) Pick two modules from point 1, should you wish to implement the modules, what kind of
algorithm concept (e.g., loop) that each module shall need? (LO 2.1) (20 points)
d) Design a pseudocode for each module in point 2! (LO 2.2) (45 points)
input username
while(username!=username)
display"username salah"
display"username"
input username
end while
display "password"
input password
while (password!=password)
display"password salah"
display"masukan passwoed"
input password
end while
Display login berhasil
- Modul Produk
start
int
item = {keju, gula, mie, tomat, apel, ayam, roti, keripik, susu}
display"keju, gula, mie, tomat, apel, ayam, roti, keripik, susu"
input item
total = item.total
WHILE item > 1
x=1
While x< (total+1)
scan rak for list[x]
IF rak have list[x] THEN
add list[x] to keranjang belanja
x = x+1
END
go to chekout
IF number of items in keranjang = total THEN
give items in keranjang belanja to system to checkout
ELSE
check system for help to find missing items
IF system cannot find an item THEN
display "out of stock"
total = total(-1)
END
END
- Modul Pembayaran
start
display"welcome to payment:D"
display"payment by DANA only"
input number dana
payment = DANA balance – (cost given by system+biaya_paket)
IF(DANA balance < cost given by system)
display"saldo tidak cukup"
ELSE(DANA balance > cost given by system)
display"pembayaran sukses"
display "thank you"
end
- Modul Pengiriman
Start
switch (temp) {
case 1:
berat_total=berat*10.000
jarak_total=jarak*2.000
biaya_paket=berat_total+jarak_total
break
case 2
berat_total=berat*11.000
jarak_total=jarak*3.000
biaya_paket=berat_total+jarak_total
break
default:
print message " Pilihan Kurir tidak sesuai, Silahkan Input Ulang !!!"
break;
}
display "terimakasih"
end
- Modul Rating