This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_margin="@dimen/medium_dimen" | |
android:orientation="vertical" | |
tools:context=".MainActivity"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_marginLeft="@dimen/activity_horizontal_margin" | |
android:layout_marginTop="@dimen/activity_vertical_margin" | |
android:layout_marginRight="@dimen/activity_horizontal_margin" | |
android:layout_marginBottom="@dimen/activity_vertical_margin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.percobaanrelativelayout; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.Toast; | |
public class MainActivity extends AppCompatActivity implements View.OnClickListener { | |
Button btnLogin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(MVC) Langkah pembuatan : | |
1. Student.java | |
2. StudentView.java | |
3. StudentController.java | |
4. MVCPatternDemo.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Observer) Langkah pembuatan : | |
1. Subject.java | |
2. Abstract Observer.java | |
3. BinaryObserver.java, OctalObserver.java, dan HexaObserver.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Adapter) Langkah Pembuatan : | |
1. Interface Bird.java dan ToyDuck.java | |
2. Class Sparrow.java dan PlasticToyDuck.java | |
3. BirdAdapter.java | |
4. AdapterClient.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Singleton) Langkah Pembuatan : | |
1. Cookies.java | |
2. CookiesDemo.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Factory) Langkah Pembuatan: | |
1. Interface BangunDatar.java | |
2. Persegi.java dan Lingkaran.java | |
3. BangunDatarFactory.java | |
4. BangunDatarFactoryDemo.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Facade) Langkah pembuatan : | |
1. Interface LaptopShop.java | |
2. Asus.java, Lenovo.java, Acer.java | |
3. Facade Class ShopKeeper.java | |
4. FacadePatternClient.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Volume{ | |
public static void main(String args[]){ | |
Box b = new Box(5,5,5); | |
System.out.println(b.volume); | |
} | |
} | |
class Box { | |
public int volume; | |
Box(int length, int width, int height){ |