0% found this document useful (0 votes)
327 views2 pages

Soal Test Back End Candidate

This document contains examples and explanations of basic coding concepts: 1. It provides an example of a code smell in object-oriented programming and explains how to avoid it by refactoring code for better dependency injection. 2. It gives examples of proper and improper uses of GET and POST requests when handling HTTP requests. 3. It includes two algorithms - one to print a pattern based on a user input number, and another to generate output numbers based on a decimal input number.

Uploaded by

Syaifudin Latief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
327 views2 pages

Soal Test Back End Candidate

This document contains examples and explanations of basic coding concepts: 1. It provides an example of a code smell in object-oriented programming and explains how to avoid it by refactoring code for better dependency injection. 2. It gives examples of proper and improper uses of GET and POST requests when handling HTTP requests. 3. It includes two algorithms - one to print a pattern based on a user input number, and another to generate output numbers based on a decimal input number.

Uploaded by

Syaifudin Latief
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic concepts

1. Coding
a. Give example for code smell (1 example) which very common in OOP. Explain why, and give
scenario how to avoid.
b. Explain about Dependancy Injection with your own words and why we need Dependency Injection?

2. REST
Give example at least one each of them, what we should and shouldn’t do when handle request with
method below:
a. GET
b. POST

Algoritma
1. Write program that print the pattern as show, base on user input ( non-negative ) : example n = 8
a. 8 7 6 5 4 3 2 1
7654321
654321
54321
4321
321
21
1

b. # # # # # # #
## ##
# # # #
# # #
# # # #
## ##
#######

2. Based on this input number: 1.345.679


Create code with any mastered code to be able generate output:
1000000
300000
40000
5000
600
70
9
Basic Coding

Overview
Maju Mundur is clothing market place to connect multiple merchant and customer. To be able maintain
retention customer, Maju Mundur preparing reward point to customer which succeed transaction. Reward point
can be trade with reward which already prepared by Maju Mundur. There is two reward, Reward A worth 20
point and Reward B worth 40 point.

Objective

As backend developer you must provide API to:


● Enable merchant to create and post product
● Enable customer to buy product and rewards

User Requirement :
o Create AUTH for merchant and customer. (mandatory)
o Merchant can create product post, then they can update and delete it. (mandatory)
o Customer can view list of product. (mandatory)
o Each time transaction made, customer receive points. (mandatory)
o Merchant able to see list of customer who already bought product. (mandatory)
o Please make simple interface for user and merchant (optional)

Rule
● You must develop the API using nodejs/PHP/java.
● You are free to choose SQL/noSQL library for database storage.
● You must include database schema into your solution.

Assessment Aspect
● Clean Code
● REST request routing
● User authentication
● Business logic separation
● Database structure
● Optional: point plus for writing unit/integration test

You might also like