Skip to content

Instantly share code, notes, and snippets.

View ecojuntak's full-sized avatar
🌏

Eko Simanjuntak ecojuntak

🌏
View GitHub Profile
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class BookController extends Controller
{
/**
* Display a listing of the resource.
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.5.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java

Calculator

Problem Description

As a fan of math, I want to model a calculator which accepts add, subtract, multiply, divide, cancel and exit as commands, So that I can do basic mathematics.

Requirements

  • Input is integer
package com.gojek.bootcamp.calculator;
public class App {
public static void main(String[] args) {}
}
@ecojuntak
ecojuntak / usage
Last active August 21, 2019 16:01
## Usage
Write this file into `Main.java`:
```java
import com.gojek.bootcamp.money.Money;
public class Main {
public static void main(String[] args) {
}

Money

Problem Description

As a fan of wealth, I want to model money which can be expressed in rupees, paise or a combination thereof, So that I can

  • add values of money
  • subtract values of money
  • print money value to the screen

Geometry

Problem Description

As a fan of geometry, I want to model a line based on points consisting of (x, y) co-ordinates using the cartesian system, so that I can calculate its length. Also, I want to compare two lines for equality based on the end points so that I know when two lines are the equal.

Requirements

#!/bin/sh
./gradlew goJF
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.5.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java