Matrik 3×3,Determinan ( Inheritanse ) (Java)

Gambar di atas merupakan hasil,Disini saya membuat 5 class . Pertama yang pastinya main,matrik3x3(Sebagai Proses ) , tulis , Cetak , getDeterminan.

1. Create Class Matrik3x3

public class Matrik3x3 {

/**
* @param args the command line arguments
*/
public static double determinan(int b[][], int m) {
int i,j, c[][] = new int[5][5];
double sum = 0;
if(m==2){
sum = b[0][0]*b[1][1] – b[0][1]*b[1][0];
return sum;
}
for(int p=0;p<m;p++){
int h = 0,k = 0;
for(i=1;i<m;i++){
for(j=0;j<m;j++){
if(j==p)
continue;
c[h][k] = b[i][j];
k++;
if(k == m-1){
h++;
k = 0;
}
}
}
sum = sum + b[0][p] * Math.pow(-1,p) * determinan(c,(m-1));
}
return sum;
}
}

2.Create Class Tulis

import java.io.DataInputStream;
import java.io.IOException;

/**
*
* @author aerdy
*/
public class Tulis{

public static void tulis(int b[][], int m) throws IOException{
DataInputStream input = new DataInputStream(System.in);
for(int i=0;i<m;i++){
for(int j=0;j<m;j++){
System.out.print("Elemen ke ["+(i+1)+","+(j+1)+"]"+" : ");
b[i][j] = Integer.parseInt(input.readLine());
}
}
}

}

3. Create Class Cetak

public class Cetak{

public static void cetak(int b[][], int m){
for(int i=0;i<m;i++){
System.out.print(" ");
for(int j=0;j<m;j++)
System.out.print(b[i][j]+" ");
System.out.print("\n");
}
}

}

4.Create Class getDeterminan

import java.io.IOException;

/**
*
* @author aerdy
*/
public class getDeterminan extends Matrik3x3{

Tulis tl = new Tulis(); // Menginstansikan kembali class Tulis
Cetak ct = new Cetak(); // Menginstansikan class cetak
public static void getDeterminan(int d) throws IOException{
int a[][] = new int[d][d]; // Array Untuk 3×3
double result;
Tulis.tulis(a, d); // Memanggil method tulis pada Class Tulis
Cetak.cetak(a, d); // Memanggil method cetak pada class cetak
result = determinan(a, d); // memanggil method determinan dari class Matrik3x3
System.out.println(“Hasil matriks diatas adalah : “+result); // menampilkan hasil
}

}

5.Craate Class Main

import java.io.DataInputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author aerdy
*/
public class Main extends getDeterminan{ // Merupakan class utama dari seluruh class

public static void main(String[] args) {

DataInputStream inputs = new DataInputStream(System.in);
getDeterminan gt = new getDeterminan(); //Menginstansikan class getDeterminan
try {
getDeterminan(3); //Memanggil method getDeterminan Untuk di eksekusi

} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}

}

}

Silakan Download Projecnya Di Sini

Bilangan Prima (java)

//nama : anna arthdi putra
//nim : 10030035

/**
*
* @author aerdy
*/
public class Prima100 {
public static void main(String[] args) {

int input = 0;
for(input=0;input= 2;input++) {
isPrime = true;

for (int i = 2; i < input; i++) {
if (input % i == 0) {

isPrime = false;
break;
}
}
}
if(isPrime==true)
System.out.println("Angka" + input + " Adalah bilangan Prima");
}
}
}

Desain Web ( HTML + CSS )

Alhamdulilah ketemu lagi dengan aeroyid Blog , ini tema pertama kali saya memposting masah Web , karena saya mempunyai misi , sehingga harus di isi amunisi nya sejak sekarang , Ini sebuat hasil yang saya buat sedemikian ruma nya , saya berharap ini dapat berguna bagi teman – teman sekalian , saya berharap ini dapat di Download dan di kembangkan sendiri , bila tema – teman ingin mengedit ,memperbanyak saya sangat senang hati. Di sini saya menggunakan CSS sebagai Style nya .

Scrip Html

Dapat di Lihat di Download nya.

Scrip CSS

body {
margin: 20px auto;
width: 900px;
background-color: black;
}

header, nav, section, button, foto, isi1, isi2, footer {
display: block;
}

header {

background-image: url(Images/herderku.png);
}

logo {
float: left;
height: 50px;
width: 50px;
margin: 10px 10px 10px 50px;
}

logo2 {
float: left;
height: 90px;
width: 100px;
margin: 10px 10px 10px 50px;
}

teksTE {
float: left;
margin: 35px 10px 10px 40px;
font-size: 35px;
font-style: italic;
font-weight: bold;
color:#2a8dd9;
}

nav {
float: left;
width: 900px;
height: 40px;
background-color: black;
}

teksSearch {
float: left;
margin: 10px 10px 10px 30px;
color: #0635a1;
}

formSearch {
float: left;
width: 90px;
height: 20px;
margin: 10px 10px 10px 0px;
}

button {
cursor: pointer;
float: right;
height: 25px;
width: 110px;
background-color: #a6f300;
text-align: center;
color: black;
}

section {
margin: 0px;
float: left;
width: 900px;
height: 370px;
}

foto {
float: left;
height: 4000px;
width: 300px;
border: 10px solid black;
}

isi1 {
height: 200px;
width: 600px;
border: 1px solid black;
margin-left: 350px;
padding: 10px;
color: #a6f300;

}

isi2 {
height: 128px;
width: 560px;
background-color: #a6f300;
margin-left: 320px;
color: black;
padding: 10px;
float:right;
}

footer {
clear: both;
height: 40px;
width: 900px;
background-image: url(FooterBG.png);
text-align: center;
color: #0635a1;
}

Download Projectnya Di Sini

Downlaod IDE (Unity)

Alhamdulilah ketemu lagi dengan saya,What Is Unity ? Unity is an integrated authoring tool for creating 3D video games or other interactive content such as architectural visualizations or real-time 3D animations. Unity’s development environment runs on Microsoft Windows and Mac OS X, and the games it produces can be run on Windows, Mac, Xbox 360, PlayStation 3, Wii,[2] iPad, iPhone,[3] as well as the Android platform. It can also produce browser games that use the Unity web player plugin, supported on Mac and Windows but not Linux. The web player is also used for deployment as Mac widgets.
Unity consists of both an editor[4] for developing/designing content and a game engine[5] for executing the final product. Unity is similar to Director, Blender game engine, Virtools, Torque Game Builder, and Gamestudio, which also use an integrated graphical environment as the primary method of development.
Silakan Lihat di sini

Download File IDE nya di

Edit Grub (Shell)

#!/bin/bash
#edittampilan
#(C) Ana arthdi Putra 2011, contoh script buat para Development Linux
#file ini adalah public domain, silahkan mendistribusikan kembali
#atau mengubahnya asalkan anda mengikuti aturan – aturan dari GPL atau bacah di bawah ini
#http://creativecommons.org/licenses/by-sa/3.0/ agar anda tidak menjadi orang pembajak

ulang=’y’
while [ $ulang == ‘y’ ] || [ $ulang == ‘Y’ ]
do

echo -e ” 33[32;1;36m”
echo ” ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^”;
echo ” < ______________ INPUT REPOSITORY LOCAL ______________^";
echo " < Creator : Anna Arthdi Putra ^ ";
echo " < Job : Mahasiswa ^";
echo " < Scholl : STTA ( Sekolah Tinggi Adisudjipto ) ^ ";
echo " < email : aerdy4@gmail.com ^";
echo " < ym : annaarthdi ^";
echo " < Skype : aerdy44 ^";
echo " < Blog : aerdy.wordpress.com ^";
echo " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>”;
echo ” “;
echo ” “;
echo ” Note : – Di Edit Boleh Tapi Baca Licensi di bawah ini”;
echo ” http://creativecommons.org/licenses/by-sa/3.0/ “;
echo ” Agar Anda tidak Terjerumus”;

echo -n ” Waktu System Anda : “; date
echo -e ” 33[32;1;32m”
echo -n ” Selamat Datang “; whoami
echo “”;
echo ” 1. Edit Grub “;
echo ” 2. Tambah Gambar di Grub “;
echo ” 3. Merubah Tampilan GDM “;
echo ” 4. Menon Aktifkan Layar Login”;
read -p ” pilih menu = ” pil

if [ $pil -eq 1 ];
then
sudo gedit /boot/grub/grub.cfg

elif [ $pil -eq 2 ];
then
echo ” Ketik Alamat URL Gambar yang anda inginkan.jpeg ex : /home/aerdy/namafile.jpeg”;
read url;
sudo cp $url /boot/grub ;
elif [ $pil -eq 3 ];
then
echo ” _ _ _ __ Selerah Mengaktifkan Layar Login Restart _ _ _ _ _ _ _ _”;
echo ” dan Kembali Ke program ini lagi dan pilih No 4″;
echo ” apakah anda setuju y/t”;
read log;
sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow ;

elif [ $pil -eq 4 ];
then
sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop
else
echo “”;
exit 0 ;

fi

echo ” Kembali Ke Menu Utama y/t”;
read ulang;
done

#Copyleft (C) Anna arthdi putra 2011

Download Projectnya di Sini