/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tugas8_interface;
/**
*
* @author Toshiba
*/
public class komputer {
String menu;
public void Inputan(){
menu = "Inputan";
System.out.println(""+menu);
}
public void Process(){
menu = "Process";
System.out.println(""+menu);
}
public void Output(){
menu = "Output";
System.out.println(""+menu);
}
//INTERFACE
interface input {
public void mouse();
public void microphone();
public void scanner ();
interface process{
public void PrimaryStorage ();
public void ArithmaticLogicUnit ();
public void ControlUnit ();
interface output{
public void monitor();
public void printer ();
public void speaker ();
}
//Proceess IMPLEMENTS
public static class komputer_implementation implements input, process, output {
//INPUTAN
@Override
public void mouse()
{
System.out.println("Mouse merk Prolink");
}
@Override
public void microphone()
{
System.out.println("Microphone dengan merk TOA ORIGINAL ZM-270");
}
@Override
public void scanner()
{
System.out.println("Scanner merk Canon");
}
//PROCESS
@Override
public void PrimaryStorage()
{
System.out.println("PrimaryStorage = ukuran besarnya processor");
}
@Override
public void ArithmaticLogicUnit()
{
System.out.println("ArithmaticLogicUnit = untuk melakukan perhitungan dalam komputer");
}
@Override
public void ControlUnit()
{
System.out.println("ControlUnit = alat pengontrol yang berada dalam komputer");
}
//OUTPUT
@Override
public void monitor()
{
System.out.println("Merk Monitor ZYREX");
}
@Override
public void printer()
{
System.out.println("Merk Printer Epson");
}
@Override
public void speaker()
{
System.out.println("Merk Speaker Advance");
}
public static void main(String[] args) {
komputer a = new komputer();
komputer_implementation x = new komputer_implementation();
System.out.println("=============================");
a.Inputan();
x.mouse();
x.microphone();
x.scanner();
System.out.println("=============================");
a.Process();
x.PrimaryStorage();
x.ArithmaticLogicUnit();
x.ControlUnit();
System.out.println("=============================");
a.Output();
x.monitor();
x.printer();
x.speaker();
System.out.println("=============================");
}
}
}
}}
Posted by 08.11 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar