oryt bajy mucker sappnin ya ceant!?
import java.io.*;
import java.util.*;
import javax.swing.JDialog;
import javax.swing.JOptionPane;

public class extremeGraph
{
    private graphicsCard graphicsCardList[];
    private String forename;
    private String surname;
    private String username;
    private int choice;
    private int option;
    private int minRam;
    private int maxCost;
    private int userClockSpeed;
    private int clockSpeed1;
    private int clockSpeed2;
    private int clockSpeed3;
    private Random randomNumberGenerator;
    
    
    
    public extremeGraph()
    {
        graphicsCardList = new graphicsCard[5];
        forename = "";
        surname = "";
        username = "";
        choice = 0;
        option = 0;
        minRam = 0;
        maxCost = 0;
        userClockSpeed = 0;
        clockSpeed1 = 0;
        clockSpeed2 = 0;
        clockSpeed3 = 0;
        randomNumberGenerator = new Random();
        setUpGraphicsCardList();
    }
    
    
    
    public void setUpGraphicsCardList()
    {
        for (int pointer = 0; pointer <=4; pointer++){
            graphicsCardList[pointer] = new graphicsCard();
        }
     }
     
     
     
     
     public void processGraphicsCard()    {
        
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            graphicsCardList[graphicsCardCounter].enterGraphicsCardDetails();
            graphicsCardList[graphicsCardCounter].displayDetails();
            
            
        }
        calcUserName();
        while (choice!=5) {
            enterChoice();
            if (choice==1) {
                displayClockSpeedChoice();
            }
            else if (choice==2) {
                displayBestClockSpeed();
            }
            else if (choice==3) {
                displayRamAndCost();
            }
            else {
                displayMessage();
            }
        }
        displayMessage();
    }
        public void displayMessage() {
        System.out.println("Goodbye " + forename + "thank you for using Extremegraph");
    }
    
     
    
    
    public void calcUserName() {
        
        int randomNumber1 = 0;
        int randomNumber2 = 0;
        String randomLetter = "";
        String alpha = "abcdefghijklmnopqrstuvwxyz";
        
        forename = (JOptionPane.showInputDialog("Please enter your fore name :"));
        surname = (JOptionPane.showInputDialog("Please enter your sur name :"));
        randomNumber1 =  randomNumberGenerator.nextInt(10);
        randomNumber2 =  randomNumberGenerator.nextInt(26) +1;
        randomLetter =  alpha.substring(randomNumber2, (randomNumber2 + 1 ));
        username = forename.substring(0,1) +  surname.substring(0,1) + randomNumber1 + randomLetter;
        System.out.println("Hi " + forename + " " + surname + " your code is " + username);
    }
    
     
    
    
    public void enterChoice() {
        System.out.println("Please enter a choice from the following");
        System.out.println("1: display how many are fast enough");
        System.out.println("2: display max clock speed");
        System.out.println("3: display match requirements");
        System.out.println("4: quit");
        choice = Integer.parseInt(JOptionPane.showInputDialog("Please enter your choice :"));
        while ((choice<1) || (choice>4)) {
            System.out.println("Sorry choices 1-4, try again");
            choice = Integer.parseInt(JOptionPane.showInputDialog("Please enter your choice :"));
        }
    }

    
    
    
    private void displayClockSpeedChoice()      { 
        userClockSpeed = Integer.parseInt(JOptionPane.showInputDialog("Please enter the users specified clock speed:"));
        boolean foundFlag = false;
        int totalCard = 0;
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if (graphicsCardList[graphicsCardCounter].getClockSpeed()>(userClockSpeed))    {
                totalCard++;
                foundFlag = true;
            }
        }
        if (foundFlag = false) {
            System.out.println("Sorry graphics card " + userClockSpeed + " not found");
        }
        else
        {
            System.out.println("there are 3 cards with clock speeds greater than 800MHz");
        }
    }
    
    
    private void displayBestClockSpeed()      {
        int maxPosition = 0;
        int maxClockSpeed = graphicsCardList[maxPosition].getClockSpeed();
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if (graphicsCardList[graphicsCardCounter].getClockSpeed() > graphicsCardList[maxPosition].getClockSpeed())
            {
                maxPosition = graphicsCardCounter;
            }
        }
        System.out.println("Fastest graphics card is " + graphicsCardList[maxPosition].getGraphicsCardName());
        System.out.println("It has " + graphicsCardList[maxPosition].getClockSpeed() + " points");
    }
    
    
    


    private void displayRamAndCost()        {
        minRam = Integer.parseInt(JOptionPane.showInputDialog("Please enter minimum ram:"));
        maxCost = Integer.parseInt(JOptionPane.showInputDialog("Please enter maximum Cost:"));
        boolean foundFlag = false;
        
        System.out.printf("%20s", "Name");
        System.out.printf("%20s", "RAM Capacity");
        System.out.printf("%20s", "Clock Speed");    
        System.out.printf("%20s", "Cost in £");
        System.out.println();     
        
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if ((graphicsCardList[graphicsCardCounter].getRam()>=minRam) && ((graphicsCardList[graphicsCardCounter].getCost()<=maxCost)))  {
                graphicsCardList[graphicsCardCounter].displayDetails();        
                System.out.println();                       
                foundFlag = true;
            }
        }
        
        if (foundFlag = false) {
            System.out.println("There are 0 cards matching your search");
        }
        System.out.println(); 
 
                
    }
    



        
    
        
      public static void main(String args[])    {
        extremeGraph newExtremeGraph;
        newExtremeGraph = new extremeGraph();
        newExtremeGraph.processGraphicsCard();
    }
 
}


oryt bajy mucker sappnin ya ceant!?
===

import java.io.*;
import java.util.*;
import javax.swing.JDialog;
import javax.swing.JOptionPane;

public class extremeGraph
{
    private graphicsCard graphicsCardList[];
    private String forename;
    private String surname;
    private String username;
    private int choice;
    private int option;
    private int minRam;
    private int maxCost;
    private int userClockSpeed;
    private int clockSpeed1;
    private int clockSpeed2;
    private int clockSpeed3;
    private Random randomNumberGenerator;
    
    
    
    public extremeGraph()
    {
        graphicsCardList = new graphicsCard[5];
        forename = "";
        surname = "";
        username = "";
        choice = 0;
        option = 0;
        minRam = 0;
        maxCost = 0;
        userClockSpeed = 0;
        clockSpeed1 = 0;
        clockSpeed2 = 0;
        clockSpeed3 = 0;
        randomNumberGenerator = new Random();
        setUpGraphicsCardList();
    }
    
    
    
    public void setUpGraphicsCardList()
    {
        for (int pointer = 0; pointer <=4; pointer++){
            graphicsCardList[pointer] = new graphicsCard();
        }
     }
     
     
     
     
     public void processGraphicsCard()    {
        
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            graphicsCardList[graphicsCardCounter].enterGraphicsCardDetails();
            graphicsCardList[graphicsCardCounter].displayDetails();
            
            
        }
        calcUserName();
        while (choice!=5) {
            enterChoice();
            if (choice==1) {
                displayClockSpeedChoice();
            }
            else if (choice==2) {
                displayBestClockSpeed();
            }
            else if (choice==3) {
                displayRamAndCost();
            }
            else {
                displayMessage();
            }
        }
        displayMessage();
    }
        public void displayMessage() {
        System.out.println("Goodbye " + forename + "thank you for using Extremegraph");
    }
    
     
    
    
    public void calcUserName() {
        
        int randomNumber1 = 0;
        int randomNumber2 = 0;
        String randomLetter = "";
        String alpha = "abcdefghijklmnopqrstuvwxyz";
        
        forename = (JOptionPane.showInputDialog("Please enter your fore name :"));
        surname = (JOptionPane.showInputDialog("Please enter your sur name :"));
        randomNumber1 =  randomNumberGenerator.nextInt(10);
        randomNumber2 =  randomNumberGenerator.nextInt(26) +1;
        randomLetter =  alpha.substring(randomNumber2, (randomNumber2 + 1 ));
        username = forename.substring(0,1) +  surname.substring(0,1) + randomNumber1 + randomLetter;
        System.out.println("Hi " + forename + " " + surname + " your code is " + username);
    }
    
     
    
    
    public void enterChoice() {
        System.out.println("Please enter a choice from the following");
        System.out.println("1: display how many are fast enough");
        System.out.println("2: display max clock speed");
        System.out.println("3: display match requirements");
        System.out.println("4: quit");
        choice = Integer.parseInt(JOptionPane.showInputDialog("Please enter your choice :"));
        while ((choice<1) || (choice>4)) {
            System.out.println("Sorry choices 1-4, try again");
            choice = Integer.parseInt(JOptionPane.showInputDialog("Please enter your choice :"));
        }
    }

    
    
    
    private void displayClockSpeedChoice()      { 
        userClockSpeed = Integer.parseInt(JOptionPane.showInputDialog("Please enter the users specified clock speed:"));
        boolean foundFlag = false;
        int totalCard = 0;
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if (graphicsCardList[graphicsCardCounter].getClockSpeed()>(userClockSpeed))    {
                totalCard++;
                foundFlag = true;
            }
        }
        if (foundFlag = false) {
            System.out.println("Sorry graphics card " + userClockSpeed + " not found");
        }
        else
        {
            System.out.println("there are 3 cards with clock speeds greater than 800MHz");
        }
    }
    
    
    private void displayBestClockSpeed()      {
        int maxPosition = 0;
        int maxClockSpeed = graphicsCardList[maxPosition].getClockSpeed();
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if (graphicsCardList[graphicsCardCounter].getClockSpeed() > graphicsCardList[maxPosition].getClockSpeed())
            {
                maxPosition = graphicsCardCounter;
            }
        }
        System.out.println("Fastest graphics card is " + graphicsCardList[maxPosition].getGraphicsCardName());
        System.out.println("It has " + graphicsCardList[maxPosition].getClockSpeed() + " points");
    }
    
    
    


    private void displayRamAndCost()        {
        minRam = Integer.parseInt(JOptionPane.showInputDialog("Please enter minimum ram:"));
        maxCost = Integer.parseInt(JOptionPane.showInputDialog("Please enter maximum Cost:"));
        boolean foundFlag = false;
        
        System.out.printf("%20s", "Name");
        System.out.printf("%20s", "RAM Capacity");
        System.out.printf("%20s", "Clock Speed");    
        System.out.printf("%20s", "Cost in £");
        System.out.println();     
        
        for  (int graphicsCardCounter = 0; graphicsCardCounter <=4; graphicsCardCounter++) {
            if ((graphicsCardList[graphicsCardCounter].getRam()>=minRam) && ((graphicsCardList[graphicsCardCounter].getCost()<=maxCost)))  {
                graphicsCardList[graphicsCardCounter].displayDetails();        
                System.out.println();                       
                foundFlag = true;
            }
        }
        
        if (foundFlag = false) {
            System.out.println("There are 0 cards matching your search");
        }
        System.out.println(); 
 
                
    }
    



        
    
        
      public static void main(String args[])    {
        extremeGraph newExtremeGraph;
        newExtremeGraph = new extremeGraph();
        newExtremeGraph.processGraphicsCard();
    }
 
}

