Friday, 21 November 2014

Suitability of Procedural Languages for Graphical Applications (D1)

Procedural languages are good for graphical applications as they allow the user to input the information without having to look at the code, this is good as it keeps it graphical and doesn't get the code involved for the user and in turn makes it a lot easier for the user to input the data themselves. They just put whatever information into the allocated box and the information will get added to the code. It also allows the program to run smoothly.

package GraphicalExample;
import javax.swing.JOptionPane;

public class GraphicalExample {

    public static void main(String[] args) {
        String yourName;
        yourName = JOptionPane.showInputDialog("What is your name?");
        System.out.println(yourName);
        JOptionPane.showMessageDialog(null, "Your name is " + yourName);



Above is an example of me creating a simple graphical program using a procedural language (Java). As you can see all the program does is let you input you're name and then shows you what your name is in another window.

In my opinion I think that Event Driven Languages such as Visual Basic is better for graphical applications as it has a lot more functionality options, There is a graphical way of coding (Drag and dropping buttons and other tools etc.) It is also more intuitive.

No comments:

Post a Comment