Postingan

Menampilkan postingan dari 2015

Class Diagram Mahasiswa CE-4B 2015

Ini link untuk class diagram mahasiswa CE-4B 2015 https://drive.google.com/open?id=0B-NzpVPM1E98cWpTSmdzUDB5Rjg

Servlet Dengan Jumlah yang Bisa Ditampung (Client) 5 Secara Bersamaan

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package siregar.romauli.siregar.servlet; import java.io.*; import java.util.Enumeration; import javax.servlet.ServletException; import javax.servlet.http.*; import siregar.romauli.siregar.thread.*; /**  *  * @author toshiba  */ public class FirstServlet extends HttpServlet {     public int numberOfClients = 5;     public int numberMax = 0;     ProcessThread aThread = null;     /**      * Processes requests for both HTTP      * <code>GET</code> and      * <code>POST</code> methods.      *      * @param request servlet request      * @param response servlet response      * @throws ServletException if a servlet-specific error occurs      * @throws IOException if an I/O error occurs      */     protected void processRequest(HttpServletRequest request, HttpServletResponse response, String str)             throws ServletException, IOExcep

Servlet Dengan Jumlah yang Bisa Ditampung (Client) 5 Secara Bersamaan

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package siregar.romauli.siregar.servlet; import java.io.*; import java.util.Enumeration; import javax.servlet.ServletException; import javax.servlet.http.*; import siregar.romauli.siregar.thread.*; /**  *  * @author toshiba  */ public class FirstServlet extends HttpServlet {     public int numberOfClients = 5;     public int numberMax = 0;     ProcessThread aThread = null;     /**      * Processes requests for both HTTP      * <code>GET</code> and      * <code>POST</code> methods.      *      * @param request servlet request      * @param response servlet response      * @throws ServletException if a servlet-specific error occurs      * @throws IOException if an I/O error occurs      */     protected void processRequest(HttpServletRequest request, HttpServletResponse response, String str)             throws ServletException, IOExcep

Menambah dan Mengalikan Angka dengan servlet di java

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package siregar.romauli.siregar.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /**  *  * @author toshiba  */ public class FirstServlet extends HttpServlet {     /**      * Processes requests for both HTTP      * <code>GET</code> and      * <code>POST</code> methods.      *      * @param request servlet request      * @param response servlet response      * @throws ServletException if a servlet-specific error occurs      * @throws IOException if an I/O error occurs      */     protected void processRequest(HttpServletRequest request, HttpServletResponse response, String str)             throws ServletException, IOException {         response.setCont

Menentukan Bilangan Terbesar dari Bilangan Bulat

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ /**  *  * @author toshiba  */ import java.util.Scanner; public class bilanganbulat {     public static void main(String[] args) {         Scanner input = new Scanner(System.in);         int bilangan;         int Max;         int Counter[];         System.out.print("Masukkan jumlah angka yang ingin diinputkan: ");         bilangan = input.nextInt();         Counter = new int[bilangan];         for (int i = 0; i < bilangan; i++) {             System.out.print("Masukkan angka : ");             Counter[i] = input.nextInt();             Max = Counter[0];             for (int k = 0; k < bilangan; k++) {                 if (Counter[k] > Max) {                     Max = Counter[k];                 }             }             System.out.println("Bilangan Bulat Yang Terbesar : " + Max);         }     } }