View Single Post
Old May 8th, 2005, 7:54 PM   #26
Dark Flare Knight
Hobbyist Programmer
 
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4 Dark Flare Knight is on a distinguished road
Well the rest is pretty much the same so i won't paste it.
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;
        for (int i = 0 ; i < 10 ; i++)
        {
            name [0] = name1.readLine ();
            phone [0] = phone1.readLine ();
            email [0] = email1.readLine ();
            info [0] = info3.readLine ();
            info1 [0] = info4.readLine ();
            info2 [0] = info4.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 ();
                                        if (addname.equalsIgnoreCase ("Zain Qureshi") == true || addname.equalsIgnoreCase ("Zain") == true || addname.equalsIgnoreCase ("Qureshi Zain") == true || addname.equalsIgnoreCase ("Qureshi") == true || addname.equalsIgnoreCase ("Qureshi, Zain") == true)
                                        {
                                            c.clear ();
                                            c.setTextColor (Color.black);
                                            c.println ("Phantom Networks");
                                            c.println ();
                                            c.setTextColor (Color.orange);
                                            c.print ("Name: ");
                                            c.setTextColor (Color.white);
                                            c.println (name [0]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Phone Number: ");
                                            c.setTextColor (Color.white);
                                            c.println (phone [0]);
                                            c.setTextColor (Color.orange);
                                            c.print ("E-mail: ");
                                            c.setTextColor (Color.white);
                                            c.println (email [0]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Address: ");
                                            c.setTextColor (Color.white);
                                            c.println (info [0]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info1 [0]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info2 [0]);
                                            c.setTextColor (Color.blue);
                                            c.print ("Go Back? ");
                                            c.setTextColor (Color.white);
                                            back = c.readLine ();
                                        }
                                        if (addname.equalsIgnoreCase ("Karan Khak") == true || addname.equalsIgnoreCase ("Karan") == true || addname.equalsIgnoreCase ("Khak Karan") == true || addname.equalsIgnoreCase ("Khak, Karan") == true)
                                        {
                                            c.clear ();
                                            c.setTextColor (Color.black);
                                            c.println ("Phantom Networks");
                                            c.println ();
                                            c.setTextColor (Color.orange);
                                            c.print ("Name: ");
                                            c.setTextColor (Color.white);
                                            c.println (name [1]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Phone Number: ");
                                            c.setTextColor (Color.white);
                                            c.println (phone [1]);
                                            c.setTextColor (Color.orange);
                                            c.print ("E-mail: ");
                                            c.setTextColor (Color.white);
                                            c.println (email [1]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Address: ");
                                            c.setTextColor (Color.white);
                                            c.println (info1 [1]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info2 [1]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info3 [1]);
                                            c.setTextColor (Color.blue);
                                            c.print ("Go Back? ");
                                            c.setTextColor (Color.white);
                                            back = c.readLine ();
                                        }
                                        if (addname.equalsIgnoreCase ("Syed Raza") == true || addname.equalsIgnoreCase ("Syed") == true || addname.equalsIgnoreCase ("Raza Syed") == true || addname.equalsIgnoreCase ("Raza, Syed") == true)
                                        {
                                            c.clear ();
                                            c.setTextColor (Color.black);
                                            c.println ("Phantom Networks");
                                            c.println ();
                                            c.setTextColor (Color.orange);
                                            c.print ("Name: ");
                                            c.setTextColor (Color.white);
                                            c.println (name [2]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Phone Number: ");
                                            c.setTextColor (Color.white);
                                            c.println (phone [2]);
                                            c.setTextColor (Color.orange);
                                            c.print ("E-mail: ");
                                            c.setTextColor (Color.white);
                                            c.println (email [2]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Address: ");
                                            c.setTextColor (Color.white);
                                            c.println (info1 [2]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info2 [2]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info3 [2]);
                                            c.setTextColor (Color.blue);
                                            c.print ("Go Back? ");
                                            c.setTextColor (Color.white);
                                            back = c.readLine ();
                                        }
                                        if (addname.equalsIgnoreCase ("Anjishnu Sarkar") == true || addname.equalsIgnoreCase ("Anjishnu") == true || addname.equalsIgnoreCase ("Sarkar Anjishnu") == true || addname.equalsIgnoreCase ("Sarkar, Anjishnu") == true)
                                        {
                                            c.clear ();
                                            c.setTextColor (Color.black);
                                            c.println ("Phantom Networks");
                                            c.println ();
                                            c.setTextColor (Color.orange);
                                            c.print ("Name: ");
                                            c.setTextColor (Color.white);
                                            c.println (name [3]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Phone Number: ");
                                            c.setTextColor (Color.white);
                                            c.println (phone [3]);
                                            c.setTextColor (Color.orange);
                                            c.print ("E-mail: ");
                                            c.setTextColor (Color.white);
                                            c.println (email [3]);
                                            c.setTextColor (Color.orange);
                                            c.print ("Address: ");
                                            c.setTextColor (Color.white);
                                            c.println (info1 [3]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info2 [3]);
                                            c.setTextColor (Color.orange);
                                            c.print ("\t");
                                            c.setTextColor (Color.white);
                                            c.println (info3 [3]);
                                            c.setTextColor (Color.blue);
                                            c.print ("Go Back? ");
                                            c.setTextColor (Color.white);
                                            back = c.readLine ();
                                        }

Last edited by Dark Flare Knight; May 8th, 2005 at 7:56 PM.
Dark Flare Knight is offline   Reply With Quote