package sresponse;
import javax.swing.JOptionPane;
/**
*
* @author m1305423
*/
public class SResponse {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String sResponse = JOptionPane.showInputDialog(null, "What is your name?","Enter your name", JOptionPane.QUESTION_MESSAGE);
System.out.println("You entered " + sResponse);
}
}
This is an example of a graphical application using Procedural Programming that is allow you to enter you name and then it would come up with the answer and the response of what you enter into the program.It is using string so that you could enter your name into the system and when you submit it you will receive the response.Things such as procedural programming will allow you sort out the graphical information because it will be organised in a step by step structure.It will also mean that you can organise the program when you are creating the program and it will also make it easy to test the individual programs,this is also means that you should be able to create the application without no bugs and glitches.
An advantage of using procedural programming to create the graphical program as you would be able to simulate real life events much easier using procedural programming and also because you would be able to use coding over and over again which will mean that it is easy to create a program with it.This is because if you need to repeat a function more than once you will be able to whilst creating the program.The programming styles will make the system easier to create and they have been used in the creation of operating systems such as linux that was created by Python.
No comments:
Post a Comment