Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.Random;
- /**
- * Ini class responder
- * class ini berfungsi sebagai tanggapan dari pertanyaan atau inputan user
- *
- * @author Yusuf Anfasya
- * @version 0.0.1
- */
- public class Responder
- {
- /**
- * Create a responder.
- */
- public Responder()
- {
- }
- /**
- * Generate a response.
- * @return A string that should be displayed as the
- * response
- */
- String response;
- public String generateResponse(String Problem)
- {
- if(Problem.contains("Internet saya lambat"))
- {
- response = "Anda Bisa mencoba APN Internet terbaru ";
- }
- else if(Problem.contains("sudah APN baru"))
- {
- response = "gawai anda bisa dicoba aiplane mode di on dan off kan";
- }
- else if(Problem.contains("sudah airplane"))
- {
- response = "anda bisa mencoba restart gawai anda";
- }
- else if(Problem.contains("Baiklah, sudah bisa"))
- {
- response = "Mohon maaf atas kurang nyaman anda,Ada yang bisa dibantu kembali";
- }
- else if(Problem.contains("Terimakasih"))
- {
- response =
- "Terimakasih sudah bertanya dan selamat menikmati perjalanan internet anda";
- }
- else
- {
- response = "Mohon diperjelas pertanyaannya";
- }
- return response;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement