View Single Post
Old May 5th, 2005, 2:45 PM   #19
Dark Flare Knight
Hobbyist Programmer
 
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4 Dark Flare Knight is on a distinguished road
import java.awt.*;
import java.io.*;
import java.awt.image.*;
import hsa.Console;
public class cell implements ImageObserver
{
    static Console c = new Console (20, 40);
    static String user = "Guest", pass = "Sample", enter;
    static String user1 = "Guest", pass1 = "123456", entry = "";
    static String user2 = "a", pass2 = "a";
    static String option = "", back = "";
    static String name = "", name1 = "", rname = "", aname = "";
    static String msg = "", pnum = "";
    static char letter, key;
    private Image Pic;
    static public void main (String[] args) throws IOException
    {
        BufferedReader name1 = new BufferedReader (new FileReader ("ZainQ.txt"));
        BufferedReader phone1 = new BufferedReader (new FileReader ("KaranK.txt"));
        BufferedReader email1 = new BufferedReader (new FileReader ("SyedR.txt"));
        BufferedReader info3 = new BufferedReader (new FileReader ("AnjiS.txt"));
        BufferedReader info4 = new BufferedReader (new FileReader ("KushalM.txt"));
        BufferedReader info5 = new BufferedReader (new FileReader ("info3.txt"));
        String name[] = new String [10], phone[] = new String [10], email[] = new String [10], info[] = new String [10], info1[] = new String [10], info2[] = new String [10], addname, search = "", gender;
        name [0] = name1.readLine ();
        phone [0] = phone1.readLine ();
        email [0] = email1.readLine ();
        info [0] = info3.readLine ();
        info1 [0] = info4.readLine ();
        info2 [0] = info4.readLine ();
        name [1] = name1.readLine ();
        phone [1] = phone1.readLine ();
        email [1] = email1.readLine ();
        info [1] = info3.readLine ();
        info1 [1] = info4.readLine ();
        info2 [1] = info5.readLine ();
        name [2] = name1.readLine ();
        phone [2] = phone1.readLine ();
        email [2] = email1.readLine ();
        info [2] = info3.readLine ();
        info1 [2] = info4.readLine ();
        info2 [2] = info5.readLine ();
        name [3] = name1.readLine ();
        phone [3] = phone1.readLine ();
        email [3] = email1.readLine ();
        info [3] = info3.readLine ();
        info1 [3] = info4.readLine ();
        info2 [3] = info5.readLine ();
        name [4] = name1.readLine ();
        phone [4] = phone1.readLine ();
        email [4] = email1.readLine ();
        info [4] = info3.readLine ();
        info1 [4] = info4.readLine ();
        info2 [4] = info5.readLine ();
        name [5] = name1.readLine ();
        phone [5] = phone1.readLine ();
        email [5] = email1.readLine ();
        info [5] = info3.readLine ();
        info1 [5] = info4.readLine ();
        info2 [5] = info5.readLine ();
        name [6] = name1.readLine ();
        phone [6] = phone1.readLine ();
        email [6] = email1.readLine ();
        info [6] = info3.readLine ();
        info1 [6] = info4.readLine ();
        info2 [6] = info5.readLine ();
        name [7] = name1.readLine ();
        phone [7] = phone1.readLine ();
        email [7] = email1.readLine ();
        info [7] = info3.readLine ();
        info1 [7] = info4.readLine ();
        info2 [7] = info5.readLine ();
        name [8] = name1.readLine ();
        phone [8] = phone1.readLine ();
        email [8] = email1.readLine ();
        info [8] = info3.readLine ();
        info1 [8] = info4.readLine ();
        info2 [8] = info5.readLine ();
        name [9] = name1.readLine ();
        phone [9] = phone1.readLine ();
        email [9] = email1.readLine ();
        info [9] = info3.readLine ();
        info1 [9] = info4.readLine ();
        info2 [9] = info5.readLine ();
        do
        {
            do
            {
                c.setTextBackgroundColor (Color.gray);
                c.setTextColor (Color.black);
                c.setColor (Color.gray);
                c.fillRect (0, 0, 325, 410);
                c.clear ();
                new cell ();
                c.setCursor (1, 12);
                c.println ("Phantom Networks");
                c.println ();
                c.setCursor (7, 1);
                c.setColor (Color.gray);
                c.setTextColor (Color.orange);
                c.println ("If You Are A Guest, Log In Using: ");
                c.println ("Username: Guest");
                c.println ("Password: Sample");
                c.setTextColor (Color.black);
                c.println ();
                do
                {
                    do
                    {
                        c.setTextColor (Color.blue);
                        c.print ("Username: ");
                        c.setTextColor (Color.white);
                        enter = c.readLine ();
                        c.setTextColor (Color.black);
                        if (enter.equals (user) == false && enter.equals (user1) == false)
                        {
                            c.setTextColor (Color.red);
                            c.println ("User does not exist");
                        }
                    }
                    while (!enter.equals (user) && !enter.equals (user1));
                    c.setTextColor (Color.blue);
                    c.setCursor (12, 1);
                    c.setTextColor (Color.blue);
                    c.print ("Password: ");

                    do
                    {
                        c.setTextColor (Color.white);
                        letter = c.getChar ();
                        if ((int) letter >= 32 && (int) letter <= 126)
                        {
                            c.print ("*");
                            entry = entry + letter;
                        }
                        else if ((int) letter == 8 && entry.length () != 0)
                        {
                            c.setCursor (12, (11 + entry.length ()) - 1);
                            c.print (" ");
                            c.setCursor (12, 11 + entry.length () - 1);
                            if (entry.length () > 1)
                                entry = entry.substring (0, entry.length () - 1);
                            else
                                entry = "";

                            c.setTextColor (Color.black);
                        }
                    }
                    while ((int) letter != 10);
                    if (enter.equals (user) == true)
                    {
                        if (entry.equals (pass) == false)
                        {
                            c.setTextColor (Color.red);
                            c.println ("Invalid ... try again.");
                            c.setTextColor (Color.black);

                        }
                    }
                    if (enter.equals (user1) == true)
                    {
                        if (entry.equals (pass1) == false)
                        {
                            c.setTextColor (Color.red);
                            c.println ("Invalid ... try again.");
                            c.setTextColor (Color.black);
                        }
                    }
                }
                while (!entry.equals (pass) && !entry.equals (pass1));
                String option2 = "", option3 = "", option4 = "", option5 = "", option6 = "";
                if (enter.equals (user) == true)
                {
                    c.println ();
                    c.setTextColor (Color.blue);
                    c.print ("Connecting ");
                    c.setTextColor (Color.black);
                    c.print (".");
                    for (long x = 0 ; x < 70000000 ; x++)
                        ;
                    c.print (".");
                    for (long y = 0 ; y < 90000000 ; y++)
                        ;
                    c.print (".");
                    for (long z = 0 ; z < 100000000 ; z++)
                        ;
                    c.setTextColor (Color.green);
                    c.println (" Connected");
                    c.setTextColor (Color.blue);
                    c.print ("Gaining Access ");
                    c.setTextColor (Color.black);
                    c.print (".");
                    for (long a = 0 ; a < 90000000 ; a++)
                        ;
                    c.print (".");
                    for (long b = 0 ; b < 110000000 ; b++)
                        ;
                    c.print (".");
                    for (long d = 0 ; d < 115000000 ; d++)
                        ;
                    c.print (".");
                    for (long e = 0 ; e < 20000000 ; e++)
                        ;
                    c.print (".");
                    for (long f = 0 ; f < 150000000 ; f++)
                        ;
                    c.setTextColor (Color.green);
                    c.println (" Access Granted");
                    c.setTextColor (Color.darkGray);
                    c.println ();
                    for (long g = 0 ; g < 100000000 ; g++)
                        ;
                    for (long h = 0 ; h < 100000000 ; h++)
                        ;
                    for (long i = 0 ; i < 100000000 ; i++)
                        ;
                    c.setTextColor (Color.blue);
                    c.print ("Logging in");
                    c.setTextColor (Color.black);
                    c.print (".");
                    for (long f = 0 ; f < 250000000 ; f++)
                        ;
                    c.print (".");
                    for (long f = 0 ; f < 350000000 ; f++)
                        ;
                    c.print (".");
                    for (long f = 0 ; f < 300000000 ; f++)
                        ;
                    c.print (".");
                    for (long f = 0 ; f < 295000000 ; f++)
                        ;
                    do
                    {
                        do
                        {
                            c.setTextColor (Color.black);
                            c.clear ();
                            c.println ("Phantom Networks");
                            c.println ();
                            c.setTextColor (Color.orange);
                            c.println ("Menu");
                            c.println ("Make A Call");
                            c.println ("Text Message");
                            c.println ("Address Book");
                            c.println ("Log Off");
                            c.println ("Turn Off");
                            c.println ();
                            c.setTextColor (Color.white);
                            option = "";
                            option = c.readLine ();
                            c.setTextColor (Color.black);
                            if (option.equalsIgnoreCase ("Menu") == true)
                            {
                                do
                                {
                                    c.clear ();
                                    c.setTextColor (Color.black);
                                    c.println ("Phantom Networks");
                                    c.println ();
                                    c.setTextColor (Color.orange);
                                    c.println ("Calculator");
                                    c.println ("Games");
                                    c.println ("Options");
                                    c.println ("Go Back");
                                    c.println ();
                                    c.setTextColor (Color.white);
                                    option2 = c.readLine ();
                                    if (option2.equalsIgnoreCase ("Calculator") == true)
                                    {
                                        do
                                        {
                                            c.clear ();
                                            c.setTextColor (Color.black);
                                            c.println ("Phantom Networks");
                                            c.println ();
                                            c.setTextColor (Color.orange);
                                            c.println ("Volume");
                                            c.println ("Go Back");
                                            c.println ();
                                            c.setTextColor (Color.white);
                                            option3 = c.readLine ();
                                            if (option3.equalsIgnoreCase ("Volume") == true)
                                            {
                                                do
                                                {
                                                    c.clear ();
                                                    c.setTextColor (Color.black);
                                                    c.println ("Phantom Networks");
                                                    c.println ();
                                                    c.setTextColor (Color.orange);
                                                    c.println ("Square");
                                                    c.println ("Cylinder");
                                                    c.println ("Go Back");
                                                    c.println ();
                                                    c.setTextColor (Color.white);
                                                    option4 = c.readLine ();
                                                    if (option4.equalsIgnoreCase ("Square") == true)
                                                    {
                                                        c.clear ();
                                                        c.setTextColor (Color.black);
                                                        c.println ("Phantom Networks");
                                                        c.setTextColor (Color.orange);
                                                        c.println ("Volume = Length x Width x Height");
                                                        c.println ();
                                                        c.setTextColor (Color.blue);
                                                        int len, wid, hei;
                                                        c.print ("Length: ");
                                                        c.setTextColor (Color.white);
                                                        len = c.readInt ();
                                                        c.setTextColor (Color.blue);
                                                        c.print ("Width: ");
                                                        c.setTextColor (Color.white);
                                                        wid = c.readInt ();
                                                        c.setTextColor (Color.blue);
                                                        c.print ("Height: ");
                                                        c.setTextColor (Color.white);
                                                        hei = c.readInt ();
                                                        c.println ();
                                                        c.setTextColor (Color.darkGray);
                                                        c.print ("Volume: ");
                                                        c.setTextColor (Color.white);
                                                        c.println (len * wid * hei);
                                                        c.println ();
                                                        c.setTextColor (Color.blue);
                                                        c.print ("Go Back? ");
                                                        c.setTextColor (Color.white);
                                                        option5 = c.readLine ();
                                                    }
                                                }
                                                while (option5.equalsIgnoreCase ("yes"));
                                            }
                                        }
                                        while (option4.equalsIgnoreCase ("Go back"));
                                    }
                                }
                                while (option3.equalsIgnoreCase ("GO back"));
                            }
                            if (option.equalsIgnoreCase ("Make a call") == true)
                            {
                                c.clear ();
                                c.println ("Phantom Networks");
                                c.println ();
                                c.print ("This section is currently unavailable.");
                                c.println ();
                                c.println ("Thank You,");
                                c.println ("Phantom Staff");
                                c.println ();
                                c.print ("Go back? ");
                                c.setTextColor (Color.white);
                                back = c.readLine ();
                                c.setTextColor (Color.black);
                            }
                            if (option.equalsIgnoreCase ("Text Message") == true)
                            {
                                c.clear ();
                                c.println ("Phantom Networks");
                                c.println ();
                                c.setTextColor (Color.blue);
                                c.print ("Reciever's Name: ");
                                c.setTextColor (Color.white);
                                rname = c.readString ();
                                c.setTextColor (Color.blue);
                                c.print ("Phone Number? ");
                                c.setTextColor (Color.white);
                                pnum = c.readString ();
                                c.setTextColor (Color.blue);
                                c.print ("Message: ");
                                c.setTextColor (Color.white);
                                msg = c.readString ();
                                c.setTextColor (Color.blue);
                                c.println ();
                                c.print ("Your message was sent to ");
                                c.setTextColor (Color.white);
                                c.print (rname);
                                c.setTextColor (Color.blue);
                                c.println (".");
                                c.println ();
                                c.setTextColor (Color.black);
                                c.print ("Go back? ");
                                c.setTextColor (Color.white);
                                back = c.readString ();
                            }
                            if (option.equalsIgnoreCase ("address book") == true)
                            {
                                do
                                {
                                    c.clear ();
                                    c.setTextColor (Color.black);
                                    c.println ("Phantom Networks");
                                    c.println ();
                                    c.setTextColor (Color.orange);
                                    c.println ("Name");
                                    c.println ("Age");
                                    c.println ("Go Back");
                                    c.println ();
                                    c.setTextColor (Color.blue);
                                    c.print ("Category: ");
                                    c.setTextColor (Color.blue);
                                    search = c.readLine ();
                                    if (search.equalsIgnoreCase ("Name") == true)
                                    {
                                        c.clear ();
                                        c.setTextColor (Color.black);
                                        c.println ("Phantom Networks");
                                        c.println ();
                                        c.setTextColor (Color.orange);
                                        c.println ("Anjishnu Sarkar");
                                        c.println ("Fawaz Altaf Bahmany");
                                        c.println ("Karan Khak");
                                        c.println ("Kushal Mehta");
                                        c.println ("Muzammil Zain");
                                        c.println ("Nippun Goel");
                                        c.println ("Salman Siddiqui");
                                        c.println ("Shivum Shukla");
                                        c.println ("Syed Raza");
                                        c.println ("Zain Qureshi");
                                        c.println ();
                                        c.setTextColor (Color.blue);
                                        c.print ("Name: ");
                                        c.setTextColor (Color.white);
                                        addname = c.readString ();
Dark Flare Knight is offline   Reply With Quote