May 5th, 2005, 2:49 PM
|
#21
|
|
Hobbyist Programmer
Join Date: Mar 2005
Location: Canada
Posts: 113
Rep Power: 4 
|
{
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 ("Reciever's Name? ");
name1 = c.readString ();
c.println ("? ");
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 ("Gender");
c.println ("Age");
c.println ("Go Back");
c.println ();
c.setTextColor (Color.blue);
c.print ("Category: ");
c.setTextColor (Color.white);
search = c.readLine ();
if (search.equalsIgnoreCase ("Name") == true)
{
c.println ();
c.setTextColor (Color.blue);
c.print ("Name: ");
c.setTextColor (Color.white);
addname = c.readLine ();
if (addname.equalsIgnoreCase ("Zain Qureshi") == 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 (name1);
c.setTextColor (Color.orange);
c.print ("Phone Number: ");
c.setTextColor (Color.white);
c.println (phone1);
c.setTextColor (Color.orange);
c.print ("E-mail: ");
c.setTextColor (Color.white);
c.println (email1);
c.setTextColor (Color.orange);
c.print ("Address: ");
c.setTextColor (Color.white);
c.println (info2);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info1);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info2);
c.print ("Go Back? ");
back = c.readLine ();
}
if (name.equalsIgnoreCase ("Karan Khak") == 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);
c.setTextColor (Color.orange);
c.print ("Phone Number: ");
c.setTextColor (Color.white);
c.println (phone2);
c.setTextColor (Color.orange);
c.print ("E-mail: ");
c.setTextColor (Color.white);
c.println (email);
c.setTextColor (Color.orange);
c.print ("Address: ");
c.setTextColor (Color.white);
c.println (info3);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info4);
c.setTextColor (Color.orange);
c.print ("\t");
c.setTextColor (Color.white);
c.println (info5);
c.println ();
c.print ("Go Back? ");
back = c.readLine ();
}
}
if (search.equalsIgnoreCase ("Gender") == true)
{
c.print ("Please enter the person's gender: ");
gender = c.readString ();
}
}
while (back.equalsIgnoreCase ("yes"));
}
if (option.equalsIgnoreCase ("Turn Off") == true)
{
c.clear ();
c.setTextColor (Color.black);
c.println ("Phantom Networks");
c.println ();
c.setTextColor (Color.darkGray);
c.println ("Thank you for choosing our service.");
c.println ();
c.println ("\tPhantom Network Staff");
c.setTextColor (Color.blue);
c.print ("CLosing Access ");
c.setTextColor (Color.black);
c.print (".");
for (long a = 0 ; a < 70000000 ; a++)
;
c.print (".");
for (long b = 0 ; b < 70000000 ; b++)
;
c.print (".");
for (long d = 0 ; d < 70000000 ; d++)
;
c.print (".");
for (long e = 0 ; e < 70000000 ; e++)
;
c.print (".");
for (long f = 0 ; f < 70000000 ; f++)
;
c.setTextColor (Color.green);
c.println ("Shutdown was successful");
c.setTextColor (Color.darkGray);
c.println ();
c.println ("Please press any key when you are ready");
c.getChar ();
c.close ();
}
}
while (search.equalsIgnoreCase ("go back"));
}
while (back.equalsIgnoreCase ("Yes"));
}
}
}
while (option.equalsIgnoreCase ("log off"))
;
if (back.equalsIgnoreCase ("No") == true)
{
c.clear ();
c.println ("Phantom Networks");
c.println ();
c.println ("Thank you for choosing our service.");
c.getChar ();
c.close ();
}
}
public cell ()
{
Toolkit tk = Toolkit.getDefaultToolkit ();
Pic = tk.getImage ("Logo.jpg");
tk.prepareImage (Pic, -1, -1, this);
}
public boolean imageUpdate (Image img, int infoflags, int x, int y, int width, int height)
{
if (infoflags == 32)
c.drawImage (Pic, 105, 23, null);
return true;
}
}
|
|
|