Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tubes2;
- /**
- *
- * @author ADMIN
- */
- public class Tubes2 {
- String jenis;
- String warnatempat;
- String Band;
- int harga;
- int jumlah;
- public String getBand() {
- return Band;
- }
- public void setBand(String Band) {
- this.Band = Band;
- }
- public String getJenis() {
- return jenis;
- }
- public void setJenis(String jenis) {
- this.jenis = jenis;
- }
- public String getWarnatempat() {
- return warnatempat;
- }
- public void setWarnatempat(String warnatempat) {
- this.warnatempat = warnatempat;
- }
- public int getHarga() {
- return harga;
- }
- public void setHarga(int harga) {
- this.harga = harga;
- }
- public int getJumlah() {
- return jumlah;
- }
- public void setJumlah(int jumlah) {
- this.jumlah = jumlah;
- }
- public void tampil() {
- System.out.println("Band\t: " + getBand());
- System.out.println("Jenis\t: " + getJenis());
- System.out.println("Warnatempat\t: " + getWarnatempat());
- System.out.println("Harga\t: " + getHarga());
- System.out.println("Jenis\t: " + getJenis());
- }
- public void total(){
- System.out.println("total : "+(getJumlah()*getHarga()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement