//**********************************************************************//
//                                                                      //
//  Author:         Jonathan Sammy                                      //
//  Date:           January 7, 2000                                     //
//  Usage:          Calculuate cost of custom built computer at         //
//                  Premier Computing Canada (http://www.pccanada.com)  //
//  Limitation(s):  Requires CCJ class files                            //
//  Last update:    January 8, 2000                                     //
//                                                                      //
//**********************************************************************//

import ccj.*;
import java.text.NumberFormat;

public class Computer
{
	/* instance variables */
	private int subtotal;
	private int total;
	public static String compcase_type, processor_type, motherboard_type, memory_type, harddrive_type, dvd_type, soundcard_type, videocard_type, modem_type, monitor_type, diskette_type, speakers_type, keyboard_type, mouse_type, opersys_type;

	public static void main(String[] args)
	{
		System.out.println("\nWelcome to Computer World!");
		System.out.println("(prices quoted from Premier Canada Computers)");
		System.out.println("\nInvalid user input is equivalent to a selection on \"none\".\n");

		/* Case */
		System.out.println("Case:");
		System.out.println("A - Mid Tower (AT) (7 Drive Bays) - $40");
		System.out.println("B - ATX Mid Tower (6 Drive Bays) - $50");
		System.out.println("C - ATX Mid Tower (7 Drive Bays) - $75");
		System.out.println("D - Suave ATX Mid Tower (7 Drive Bays) - $75");
		System.out.println("E - Enlight ATX Mid Tower (7 Drive Bays) - $100");
		System.out.println("F - Suave II ATX Mid Tower (7 Drive Bays) - $100");
		System.out.println("G - AOpen ATX Full Tower (13 Drive Bays) - $155");
		System.out.print("Selection: ");
		String compcase = Console.in.readLine();
		System.out.println();

		if (compcase.equals("A")) compcase_type = "Mid Tower (AT) (7 Drive Bays)";
		else if (compcase.equals("B")) compcase_type = "ATX Mid Tower (6 Drive Bays)";
		else if (compcase.equals("C")) compcase_type = "ATX Mid Tower (7 Drive Bays)";
		else if (compcase.equals("D")) compcase_type = "Suave ATX Mid Tower (7 Drive Bays)";
		else if (compcase.equals("E")) compcase_type = "Enlight ATX Mid Tower (7 Drive Bays)";
		else if (compcase.equals("F")) compcase_type = "Suave II ATX Mid Tower (7 Drive Bays)";
		else if (compcase.equals("G")) compcase_type = "AOpen ATX Full Tower (13 Drive Bays)";
		else compcase_type = "NONE";

		/* Processor */
		System.out.println("Processor:");
		System.out.println("A - Intel Pentium 233MHz MMX - $85");
		System.out.println("B - AMD K6/2-300MHz (66Mhz) - $75");
		System.out.println("C - AMD K6/2-400MHz (100Mhz) - $90");
		System.out.println("D - AMD K6/2-450MHz (100Mhz) - $110");
		System.out.println("E - AMD K6/III-400MHz (100Mhz) - $160");
		System.out.println("F - AMD K6/III-450MHz (100Mhz) - $220");
		System.out.println("G - AMD Athlon (K7) 500MHz (100Mhz) - $350");
		System.out.println("H - AMD Athlon (K7) 550MHz (100Mhz) - $445");
		System.out.println("I - AMD Athlon (K7) 600MHz (100Mhz) - $655");
		System.out.println("J - AMD Athlon (K7) 650MHz (100Mhz) - $805");
		System.out.println("K - AMD Athlon (K7) 700MHz (100Mhz) - $1045");
		System.out.println("L - Intel Celeron 433MHz Socket 370 (MMX)  128K - $120");
		System.out.println("M - Intel Celeron 466MHz Socket 370 (MMX)  128K - $160");
		System.out.println("N - Intel Celeron 500MHz Socket 370 (MMX)  128K - $225");
		System.out.println("O - Intel Celeron 433MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter) - $135");
		System.out.println("P - Intel Celeron 466MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter) - $175");
		System.out.println("Q - Intel Celeron 500MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter) - $240");
		System.out.println("R - Intel Pentium II-400MHz (512k) - $250");
		System.out.println("S - Intel Pentium III-450MHz (512k) - $345");
		System.out.println("T - Intel Pentium III-500MHz (512k) - $385");
		System.out.println("U - Intel Pentium III-550MHz (512k) - $520");
		System.out.println("V - Intel Pentium III-600MHz (512k) - $685");
		System.out.println("W - Intel Pentium III-533MHz @ 133Mhz FSB (512k) - $495");
		System.out.println("X - Intel Pentium III-600MHz @ 133Mhz FSB (512k) - $685");
		System.out.println("Y - Intel Pentium III-667MHz @ 133Mhz FSB (512k) - $1020");
		System.out.print("Selection: ");
		String processor = Console.in.readLine();
		System.out.println();

		if (processor.equals("A")) processor_type = "Intel Pentium 233MHz MMX";
		else if (processor.equals("B")) processor_type = "AMD K6/2-300MHz (66Mhz)";
		else if (processor.equals("C")) processor_type = "AMD K6/2-400MHz (100Mhz)";
		else if (processor.equals("D"))	processor_type = "AMD K6/2-450MHz (100Mhz)";
		else if (processor.equals("E"))	processor_type = "AMD K6/III-400MHz (100Mhz)";
		else if (processor.equals("F"))	processor_type = "AMD K6/III-450MHz (100Mhz)";
		else if (processor.equals("G"))	processor_type = "AMD Athlon (K7) 500MHz (100Mhz)";
		else if (processor.equals("H"))	processor_type = "AMD Athlon (K7) 550MHz (100Mhz)";
		else if (processor.equals("I"))	processor_type = "AMD Athlon (K7) 600MHz (100Mhz)";
		else if (processor.equals("J"))	processor_type = "AMD Athlon (K7) 650MHz (100Mhz)";
		else if (processor.equals("K"))	processor_type = "AMD Athlon (K7) 700MHz (100Mhz)";
		else if (processor.equals("L"))	processor_type = "Intel Celeron 433MHz Socket 370 (MMX)  128K";
		else if (processor.equals("M")) processor_type = "Intel Celeron 466MHz Socket 370 (MMX)  128K";
		else if (processor.equals("N"))	processor_type = "Intel Celeron 500MHz Socket 370 (MMX)  128K";
		else if (processor.equals("O"))	processor_type = "Intel Celeron 433MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter)";
		else if (processor.equals("P"))	processor_type = "Intel Celeron 466MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter)";
		else if (processor.equals("Q"))	processor_type = "Intel Celeron 500MHz (Slot 1 w/ Socket 370 to Slot 1 Adapter)";
		else if (processor.equals("R"))	processor_type = "Intel Pentium II-400MHz (512k)";
		else if (processor.equals("S"))	processor_type = "Intel Pentium III-450MHz (512k)";
		else if (processor.equals("T"))	processor_type = "Intel Pentium III-500MHz (512k)";
		else if (processor.equals("U"))	processor_type = "Intel Pentium III-550MHz (512k)";
		else if (processor.equals("V"))	processor_type = "Intel Pentium III-600MHz (512k)";
		else if (processor.equals("W"))	processor_type = "Intel Pentium III-533MHz @ 133Mhz FSB (512k)";
		else if (processor.equals("X")) processor_type = "Intel Pentium III-600MHz @ 133Mhz FSB (512k)";
		else if (processor.equals("Y"))	processor_type = "Intel Pentium III-667MHz @ 133Mhz FSB (512k)";
		else processor_type = "NONE";

		/* Motherboard */
		System.out.println("Motherboard:");
		System.out.println("A - Houston  M585 w/ 1024k, 100MHz FSB (Super 7) - $140");
		System.out.println("B - Microstar 5169 w/ 100MHz FSB & AGP Slot (Super 7) (ATX) - $110");
		System.out.println("C - Microstar 5184 w/ 100MHz FSB & AGP Slot (Super 7) (AT) - $120");
		System.out.println("D - Abit BM6  w/ 100MHz FSB & AGP Slot (Socket 370) (ATX) - $150");
		System.out.println("E - Abit BP6  w/ 100MHz FSB & AGP Slot (Dual Socket 370) (ATX) - $200");
		System.out.println("F - Houston  M748LMRT, 100MHz FSB (Slot 1/Socket 370) - $140");
		System.out.println("G - Abit BH6 w/ Intel 440BX (Slot1) (ATX) - $160");
		System.out.println("H - Abit BF6 w/ Intel 440BX (Slot1) (ATX) - $170");
		System.out.println("I - Abit BE6-II w/ Intel 440BX, UDMA/66 (Slot1) (ATX) - $200");
		System.out.println("J - Asus P3B-F  w/ Intel 440BX (Slot1) (ATX) - $180");
		System.out.println("K - Quantum Advance 5-133E Via (Slot1) (ATX) - $120");
		System.out.println("L - Asus K7M AMD750 (Slot A) w/ On-board Sound (ATX) - $245");
		System.out.println("M - Microstar 6167 AMD750 (Slot A) (ATX) - $235");
		System.out.print("Selection: ");
		String motherboard = Console.in.readLine();
		System.out.println();

		if (motherboard.equals("A")) motherboard_type = "Houston  M585 w/ 1024k, 100MHz FSB & Video, Sound, Lan & v.90 Modem (Super 7)";
		else if (motherboard.equals("B")) motherboard_type = "Microstar 5169 w/ 100MHz FSB & AGP Slot (Super 7) (ATX)";
		else if (motherboard.equals("C")) motherboard_type = "Microstar 5184 w/ 100MHz FSB & AGP Slot (Super 7) (AT)";
		else if (motherboard.equals("D")) motherboard_type = "Abit BM6  w/ 100MHz FSB & AGP Slot (Socket 370) (ATX)";
		else if (motherboard.equals("E")) motherboard_type = "Abit BP6  w/ 100MHz FSB & AGP Slot (Dual Socket 370) (ATX)";
		else if (motherboard.equals("F")) motherboard_type = "Houston  M748LMRT, 100MHz FSB & On-board Video, Sound, Lan & v.90 Modem (Slot 1/Socket 370)";
		else if (motherboard.equals("G")) motherboard_type = "Abit BH6 w/ Intel 440BX (Slot1) (ATX)";
		else if (motherboard.equals("H")) motherboard_type = "Abit BF6 w/ Intel 440BX (Slot1) (ATX)";
		else if (motherboard.equals("I")) motherboard_type = "Abit BE6-II w/ Intel 440BX, UDMA/66 (Slot 1)";
		else if (motherboard.equals("J")) motherboard_type = "Asus P3B-F  w/ Intel 440BX (Slot1) (ATX)";
		else if (motherboard.equals("K")) motherboard_type = "Quantum Advance 5-133E Via (Slot1)";
		else if (motherboard.equals("L")) motherboard_type = "Asus K7M AMD750 (Slot A) w/ On-board Sound";
		else if (motherboard.equals("M")) motherboard_type = "Microstar 6167 AMD750 (Slot A) (ATX)";
		else motherboard_type = "NONE";

		/* Memory */
		System.out.println("Memory:");
		System.out.println("A - 32Mb SDRAM, 168 Pin Dimm Ram @ PC/100Mhz (32MBx1) - $70");
		System.out.println("B - 64Mb SDRAM, 168 Pin Dimm Ram, 8 Chip @ PC/100MHz (64MBx1) - $115");
		System.out.println("C - 64Mb SDRAM, 168 Pin Dimm Ram, 8 Chip @ PC/133MHz (64MBx1) - $145");
		System.out.println("D - 128Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100MHz (128MBx1) - $225");
		System.out.println("E - 128Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx1) - $280");
		System.out.println("F - 256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx2) - $450");
		System.out.println("G - 256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx2) - $560");
		System.out.println("H - 256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx1) - $545");
		System.out.println("I - 384Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx3) - $675");
		System.out.println("J - 384Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx3) - $840");
		System.out.println("K - 512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx4) - $900");
		System.out.println("L - 512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx4) - $1120");
		System.out.println("M - 512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx2) - $1090");
		System.out.println("N - 768Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx3) - $1635");
		System.out.println("O - 1Gb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx4) - $2180");
		System.out.print("Selection: ");
		String memory = Console.in.readLine();
		System.out.println();

		if (memory.equals("A")) memory_type = "32Mb SDRAM, 168 Pin Dimm Ram @ PC/100Mhz (32MBx1)";
		else if (memory.equals("B")) memory_type = "64Mb SDRAM, 168 Pin Dimm Ram, 8 Chip @ PC/100MHz";
		else if (memory.equals("C")) memory_type = "64Mb SDRAM, 168 Pin Dimm Ram, 8 Chip @ PC/133MHz";
		else if (memory.equals("D")) memory_type = "128Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100MHz (128MBx1)";
		else if (memory.equals("E")) memory_type = "128Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx1)";
		else if (memory.equals("F")) memory_type = "256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx2)";
		else if (memory.equals("G")) memory_type = "256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx2)";
		else if (memory.equals("H")) memory_type = "256Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx1)";
		else if (memory.equals("I")) memory_type = "384Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx3)";
		else if (memory.equals("J")) memory_type = "384Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx3)";
		else if (memory.equals("K")) memory_type = "512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (128MBx4)";
		else if (memory.equals("L")) memory_type = "512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/133Mhz (128MBx4)";
		else if (memory.equals("M")) memory_type = "512Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx2)";
		else if (memory.equals("N")) memory_type = "768Mb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx3)";
		else if (memory.equals("O")) memory_type = "1Gb SDRAM, 168 Pin Dimm Ram, 16 Chip @ PC/100Mhz (256MBx4)";
		else memory_type = "NONE";

		/* Harddrive */
		System.out.println("Harddrive:");
		System.out.println("A - 4.3Gb, EIDE 5400RPM Ultra-DMA - $135");
		System.out.println("B - 8.4Gb, EIDE 5400RPM Ultra-66 - $160");
		System.out.println("C - 9Gb, EIDE 7200RPM Ultra-66 - $180");
		System.out.println("D - 10Gb, EIDE 5400RPM Ultra-66 - $175");
		System.out.println("E - 13Gb, EIDE 5400RPM Ultra-66 - $185");
		System.out.println("F - 13Gb, EIDE 7200RPM Ultra-66 - $200");
		System.out.println("G - 17Gb, EIDE 5400RPM Ultra-66 - $210");
		System.out.println("H - 20Gb, EIDE 7200RPM Ultra-66, 2048k - $300");
		System.out.println("I - 27Gb, EIDE 7200RPM Ultra-66, 2048k - $375");
		System.out.println("J - 34Gb, EIDE 7200RPM Ultra-66, 2048k - $485");
		System.out.print("Selection: ");
		String harddrive = Console.in.readLine();
		System.out.println();

		if (harddrive.equals("A")) harddrive_type = "4.3Gb, EIDE 5400RPM Ultra-DMA";
		else if (harddrive.equals("B")) harddrive_type = "8.4Gb, EIDE 5400RPM Ultra-66";
		else if (harddrive.equals("C")) harddrive_type = "9Gb, EIDE 7200RPM Ultra-66";
		else if (harddrive.equals("D")) harddrive_type = "10Gb, EIDE 5400RPM Ultra-66";
		else if (harddrive.equals("E")) harddrive_type = "13Gb, EIDE 5400RPM Ultra-66";
		else if (harddrive.equals("F")) harddrive_type = "13Gb, EIDE 7200RPM Ultra-66";
		else if (harddrive.equals("G")) harddrive_type = "17Gb, EIDE 5400RPM Ultra-66";
		else if (harddrive.equals("H")) harddrive_type = "20Gb, EIDE 7200RPM Ultra-66, 2048k";
		else if (harddrive.equals("I")) harddrive_type = "27Gb, EIDE 7200RPM Ultra-66, 2048k";
		else if (harddrive.equals("J")) harddrive_type = "34Gb, EIDE 7200RPM Ultra-66, 2048k";
		else harddrive_type = "NONE";

		/* CD-ROM/DVD-ROM Drive */
		System.out.println("CDROM/DVD Drive:");
		System.out.println("A - NONE");
		System.out.println("B - 48X - EIDE Internal - $65");
		System.out.println("C - 52X - EIDE Internal - $70");
		System.out.println("D - Toshiba 6X DVD-ROM - $115");
		System.out.println("E - Pioneer 10X DVD-ROM - $130");
		System.out.print("Selection: ");
		String dvd = Console.in.readLine();
		System.out.println();

		if (dvd.equals("A")) dvd_type = "NONE";
		else if (dvd.equals("B")) dvd_type = "48X - EIDE Internal";
		else if (dvd.equals("C")) dvd_type = "52X - EIDE Internal";
		else if (dvd.equals("D")) dvd_type = "Toshiba 6X DVD-ROM";
		else if (dvd.equals("E")) dvd_type = "Pioneer 10X DVD-ROM";
		else dvd_type = "NONE";

		/* Sound Card */
		System.out.println("Sound Card:");
		System.out.println("A - NONE");
		System.out.println("B - On board sound (Only on Houston & Asus K7M Motherboards) - $0");
		System.out.println("C - Diamond Monster Sound MX-80 PCI Stereo Soundcard - $30");
		System.out.println("D - Diamond Monster Sound MX-300 PCI Stereo Soundcard - $80");
		System.out.println("E - Ensonic 32bit PCI Stereo Soundcard - $35");
		System.out.println("F - SoundBlaster 16 PnP - $35");
		System.out.println("G - SoundBlaster PCI 128 - $50");
		System.out.println("H - SoundBlaster Live Value II (OEM) - $75");
		System.out.println("I - SoundBlaster Live Platinum - $265");
		System.out.print("Selection: ");
		String soundcard = Console.in.readLine();
		System.out.println();

		if (soundcard.equals("A")) soundcard_type = "NONE";
		else if (soundcard.equals("B")) soundcard_type = "On board sound (Only on Houston & Asus K7M Motherboards)";
		else if (soundcard.equals("C")) soundcard_type = "Diamond Monster Sound MX-80 PCI Stereo Soundcard";
		else if (soundcard.equals("D")) soundcard_type = "Diamond Monster Sound MX-300 PCI Stereo Soundcard";
		else if (soundcard.equals("E")) soundcard_type = "Ensonic 32bit PCI Stereo Soundcard";
		else if (soundcard.equals("F")) soundcard_type = "SoundBlaster 16 PnP";
		else if (soundcard.equals("G")) soundcard_type = "SoundBlaster PCI 128";
		else if (soundcard.equals("H")) soundcard_type = "SoundBlaster Live Value II (OEM)";
		else if (soundcard.equals("I")) soundcard_type = "SoundBlaster Live Platinum";
		else soundcard_type = "NONE";

		/* Video Card */
		System.out.println("Video Card:");
		System.out.println("A - On board video (Only on Houston M585 & M748) - $0");
		System.out.println("B - Asus v6600 Deluxe GeForce 256 w/ 32Mb AGP - $425");
		System.out.println("C - ATI Xpert 98 w/ 8Mb SDRAM AGP - $80");
		System.out.println("D - ATI Xpert @ Play 98 w/ 8Mb SDRAM AGP - $95");
		System.out.println("E - ATI Xpert 2000 w/ 32Mb SDRAM AGP - $155");
		System.out.println("F - ATI Rage Fury w/ 32Mb SDRAM AGP - $180");
		System.out.println("G - ATI All-In-Wonder 128 w/ 16Mb AGP (PC2TV & TV Tuner Built-In) - $225");
		System.out.println("H - ATI All-In-Wonder 128 w/ 32Mb AGP (PC2TV & TV Tuner Built-In) - $300");
		System.out.println("I - Creative 3D Blaster Annihilator w/ 32Mb SDRAM AGP - $310");
		System.out.println("J - Creative 3D Blaster Annihilator Pro w/ 32Mb DDRRAM AGP - $400");
		System.out.println("K - Diamond Monster Fusion w/ 16Mb AGP - $100");
		System.out.println("L - Diamond Viper V770 w/ TNT2 32Mb AGP - $180");
		System.out.println("M - Diamond Viper V770 Ultra w/ TNT2 32Mb AGP - $225");
		System.out.println("N - Matrox G400 w/ 16Mb SDRAM AGP - $170");
		System.out.println("O - Matrox G400 w/ 32Mb SDRAM AGP - $225");
		System.out.println("P - Matrox G400 Dual Head w/ 32Mb AGP - $245");
		System.out.println("Q - Matrox G400 Max Dual Head w/ 32Mb AGP - $300");
		System.out.println("R - 3Dfx Voodoo3 2000 w/ 16Mb AGP - $130");
		System.out.println("S - 3Dfx Voodoo3 3000 w/ 16Mb AGP - $175");
		System.out.println("T - 3Dfx Voodoo3 3500 w/ 16Mb AGP w/ TV Tuner - $335");
		System.out.print("Selection: ");
		String videocard = Console.in.readLine();
		System.out.println();

		if (videocard.equals("A")) videocard_type = "On board video (Only on Houston M585 & M748)";
		else if (videocard.equals("B")) videocard_type = "Asus v6600 Deluxe GeForce 256 w/ 32Mb AGP";
		else if (videocard.equals("C")) videocard_type = "ATI Xpert 98 w/ 8Mb SDRAM AGP";
		else if (videocard.equals("D")) videocard_type = "ATI Xpert @ Play 98 w/ 8Mb SDRAM AGP";
		else if (videocard.equals("E")) videocard_type = "ATI Xpert 2000 w/ 32Mb SDRAM AGP";
		else if (videocard.equals("F")) videocard_type = "ATI Rage Fury w/ 32Mb SDRAM AGP";
		else if (videocard.equals("G")) videocard_type = "ATI All-In-Wonder 128 w/ 16Mb AGP (PC2TV & TV Tuner Built-In)";
		else if (videocard.equals("H")) videocard_type = "ATI All-In-Wonder 128 w/ 32Mb AGP (PC2TV & TV Tuner Built-In)";
		else if (videocard.equals("I")) videocard_type = "Creative 3D Blaster Annihilator w/ 32Mb SDRAM AGP";
		else if (videocard.equals("J")) videocard_type = "Creative 3D Blaster Annihilator Pro w/ 32Mb DDRRAM";
		else if (videocard.equals("K")) videocard_type = "Diamond Monster Fusion w/ 16Mb AGP";
		else if (videocard.equals("L")) videocard_type = "Diamond Viper V770 w/ TNT2 32Mb AGP";
		else if (videocard.equals("M")) videocard_type = "Diamond Viper V770 Ultra w/ TNT2 32Mb AGP";
		else if (videocard.equals("N")) videocard_type = "Matrox G400 w/ 16Mb SDRAM AGP";
		else if (videocard.equals("O")) videocard_type = "Matrox G400 w/ 32Mb SDRAM AGP";
		else if (videocard.equals("P")) videocard_type = "Matrox G400 Dual Head w/ 32Mb AGP";
		else if (videocard.equals("Q")) videocard_type = "Matrox G400 Max Dual Head w/ 32Mb AGP";
		else if (videocard.equals("R")) videocard_type = "3Dfx Voodoo3 2000 w/ 16Mb AGP";
		else if (videocard.equals("S")) videocard_type = "3Dfx Voodoo3 3000 w/ 16Mb AGP";
		else if (videocard.equals("T")) videocard_type = "3Dfx Voodoo3 3500 w/ 16Mb AGP w/ TV Tuner";
		else videocard_type = "NONE";

		/* Modem */
		System.out.println("Modem:");
		System.out.println("A - NONE");
		System.out.println("B - On board modem  (Only on Houston M748) - $0");
		System.out.println("C - AOpen 56K ISA Internal Fax/Modem w/ VoiceMail (v.90) - $80");
		System.out.println("D - Supra 56K PCI Internal Fax/Modem w/ VoiceMail (v.90) - $50");
		System.out.println("E - US Robotics 56K Internal Fax/Modem PCI  v.90 - $60");
		System.out.println("F - US Robotics 56K Internal Fax/Modem w/ VoiceMail OEM - $110");
		System.out.println("G - Zoltrix 56K PCI Internal Fax/Modem Winmodem (v.90) - $30");
		System.out.println("H - Zoltrix 56K PCI Internal Fax/Modem w/ VoiceMail (v.90) - $50");
		System.out.print("Selection: ");
		String modem = Console.in.readLine();
		System.out.println();

		if (modem.equals("A")) modem_type = "NONE";
		else if (modem.equals("B")) modem_type = "On board modem  (Only on Houston M748)";
		else if (modem.equals("C")) modem_type = "AOpen 56K ISA Internal Fax/Modem w/ VoiceMail (v.90)";
		else if (modem.equals("D")) modem_type = "Supra 56K PCI Internal Fax/Modem w/ VoiceMail (v.90)";
		else if (modem.equals("E")) modem_type = "US Robotics 56K Internal Fax/Modem PCI  v.90";
		else if (modem.equals("F")) modem_type = "US Robotics 56K Internal Fax/Modem w/ VoiceMail OEM";
		else if (modem.equals("G")) modem_type = "Zoltrix 56K PCI Internal Fax/Modem Winmodem (v.90)";
		else if (modem.equals("H")) modem_type = "Zoltrix 56K PCI Internal Fax/Modem w/ VoiceMail (v.90)";
		else modem_type = "NONE";

		/* Monitor */
		System.out.println("Monitor:");
		System.out.println("A - NONE");
		System.out.println("B - KDS @View 15\" SVGA 0.28dp NI 1024x768 EPA MPR2 w/ DC - $190");
		System.out.println("C - KDS @View 17\" SVGA 0.27dp NI 1280x1024 EPA MPR2 w/ DC  - $290");
		System.out.println("D - KDS/Orchestra Steel Drum 17\" SVGA 0.26dp NI 1600x1280 EPA MPR2 w/ DC - $375");
		System.out.println("E - KDS Avitron 17\" SVGA 0.25ag NI 1280x1024 EPA MPR2 w/ DC - $400");
		System.out.println("F - KDS Vis. Sens. VS195 19\" SVGA 0.26dp NI 1600x1280 EPA MPR2 w/ DC - $500");
		System.out.println("G - KDS Avitron V195T 19\" SVGA 0.25ag NI 1600x1280 EPA MPR2 w/ DC - $700");
		System.out.println("H - Optiquest Q71 17\" SVGA 0.28dp NI 1280x1024 EPA MPR2 w/ DC - $335");
		System.out.println("I - Optiquest Q95 19\" SVGA 0.26dp NI 1600x1280 EPA MPR2 w/ DC - $565");
		System.out.println("J - Viewsonic E771 17\" SVGA 0.27dp NI 1280x1024 MPR2 w/ DC - $330");
		System.out.println("K - Viewsonic G773 17\" SVGA 0.26dp NI 1280x1024 EPA MPR2 w/ DC - $460");
		System.out.println("L - Viewsonic GF775 17\" SVGA 0.24mm NI 1600x1280 EPA MPR2 w/ DC - $525");
		System.out.println("M - Viewsonic PS775 17\" SVGA 0.25dp NI 1600x1280 EPA MPR2 w/ DC USB - $515");
		System.out.println("N - Viewsonic PS790 19\" SVGA 0.25dp NI 1600x1280 EPA MPR2 w/ DC - $750");
		System.out.println("O - Viewsonic P810 21\" SVGA 0.25dp NI 1600x1280 EPA MPR2 w/ DC - $1200");
		System.out.println("P - Viewsonic P815 21\" SVGA 0.28AG NI 1600x1280 OSD TCO w/ DC - $1300");
		System.out.print("Selection: ");
		String monitor = Console.in.readLine();
		System.out.println();

		if (monitor.equals("A")) monitor_type = "NONE";
		else if (monitor.equals("B")) monitor_type = "KDS @View 15\" SVGA 0.28dp N.I. 1024x768 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("C")) monitor_type = "KDS @View 17\" SVGA 0.27dp N.I. 1280x1024 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("D")) monitor_type = "KDS/Orchestra Steel Drum 17\" SVGA 0.26dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("E")) monitor_type = "KDS Avitron 17\" SVGA 0.25ag N.I. 1280x1024 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("F")) monitor_type = "KDS Visual Sensations VS195 19\" SVGA 0.26dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("G")) monitor_type = "KDS Avitron V195T 19\" SVGA 0.25ag N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("H")) monitor_type = "Optiquest Q71 17\" SVGA 0.28dp N.I. 1280x1024 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("I")) monitor_type = "Optiquest Q95 19\" SVGA 0.26dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("J")) monitor_type = "Viewsonic E771 17\" SVGA 0.27dp N.I. 1280x1024 MPR2 w/ Digital Controls";
		else if (monitor.equals("K")) monitor_type = "Viewsonic G773 17\" SVGA 0.26dp N.I. 1280x1024 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("L")) monitor_type = "Viewsonic GF775 17\" SVGA 0.24mm N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("M")) monitor_type = "Viewsonic PS775 17\" SVGA 0.25dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls USB";
		else if (monitor.equals("N")) monitor_type = "Viewsonic PS790 19\" SVGA 0.25dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("O")) monitor_type = "Viewsonic P810 21\" SVGA 0.25dp N.I. 1600x1280 EPA MPR2 w/ Digital Controls";
		else if (monitor.equals("P")) monitor_type = "Viewsonic P815 21\" SVGA 0.28AG N.I. 1600x1280 OSD TCO w/ Digital Controls";
		else monitor_type = "NONE";

		/* Diskette */
		System.out.println("Diskette:");
		System.out.println("A - Panasonic 1.44Mb 3.5\" Floppy Drive - $20");
		System.out.println("B - 2 Panasonic 1.44Mb 3.5\"; Floppy Drives - $40");
		System.out.println("C - Panasonic LS-120 - 3.5\" Floppy Drive - $100");
		System.out.print("Selection: ");
		String diskette = Console.in.readLine();
		System.out.println();

		if (diskette.equals("A")) diskette_type = "Panasonic 1.44Mb 3.5\" Floppy Drive";
		else if (diskette.equals("B")) diskette_type = "2 Panasonic 1.44Mb 3.5\" Floppy Drives";
		else if (diskette.equals("C")) diskette_type = "Panasonic LS-120 - 3.5\" Floppy Drive";
		else diskette_type = "NONE";

		/* Speakers */
		System.out.println("Speakers:");
		System.out.println("A - NONE");
		System.out.println("B - Emcom (90 Watt PMPO) - $30");
		System.out.println("C - Koss HD/50 - $50");
		System.out.println("D - Altec Lansing ACS45.2 w/ Subwoofer USB - $90");
		System.out.println("E - Altec Lansing ADA70 w/ Subwoofer USB - $180");
		System.out.println("F - Creative Lab's Cambridge Soundworks PC Works - $80");
		System.out.println("G - Creative Lab's Cambridge Soundworks 4-Point Surround - $125");
		System.out.println("H - Creative Lab's Cambridge Soundworks 4-Point Surround FPS2000 - $245");
		System.out.println("I - Creative Lab's Cambridge Soundworks 4-Point Surround 5.1 ACS DTT2500 - $365");
		System.out.print("Selection: ");
		String speakers = Console.in.readLine();
		System.out.println();

		if (speakers.equals("A")) speakers_type = "NONE";
		else if (speakers.equals("B")) speakers_type = "Emcom (90 Watt PMPO)";
		else if (speakers.equals("C")) speakers_type = "Koss HD/50";
		else if (speakers.equals("D")) speakers_type = "Altec Lansing ACS45.2 w/ Subwoofer USB";
		else if (speakers.equals("E")) speakers_type = "Altec Lansing ADA70 w/ Subwoofer USB";
		else if (speakers.equals("F")) speakers_type = "Creative Lab's Cambridge Soundworks PC Works";
		else if (speakers.equals("G")) speakers_type = "Creative Lab's Cambridge Soundworks 4-Point Surround";
		else if (speakers.equals("H")) speakers_type = "Creative Lab's Cambridge Soundworks 4-Point Surround FPS2000";
		else if (speakers.equals("I")) speakers_type = "Creative Lab's Cambridge Soundworks 4-Point Surround 5.1 ACS DTT2500";
		else speakers_type = "NONE";

		/* Keyboard */
		System.out.println("Keyboard:");
		System.out.println("A - NONE");
		System.out.println("B - Mitsumi 104 Key w/ Win 95 Keys - $20");
		System.out.println("C - Keytronic 104 - $40");
		System.out.println("D - Logitech Internet Keyboard - $45");
		System.out.println("E - Microsoft Natural - $65");
		System.out.print("Selection: ");
		String keyboard = Console.in.readLine();
		System.out.println();

		if (keyboard.equals("A")) keyboard_type = "NONE";
		else if (keyboard.equals("B")) keyboard_type = "Mitsumi 104 Key w/ Win 95 Keys";
		else if (keyboard.equals("C")) keyboard_type = "Keytronic 104";
		else if (keyboard.equals("D")) keyboard_type = "Logitech Internet Keyboard";
		else if (keyboard.equals("E")) keyboard_type = "Microsoft Natural";
		else keyboard_type = "NONE";

		/* Mouse */
		System.out.println("Mouse:");
		System.out.println("A - NONE");
		System.out.println("B - MS Compatible 3-Button - $10");
		System.out.println("C - Belkin 3-Button USB Mouse - $20");
		System.out.println("D - Logitech (3-Button) w/ Wheel - $30");
		System.out.println("E - MS Intell-Point Mouse (2-Button) - $50");
		System.out.print("Selection: ");
		String mouse = Console.in.readLine();
		System.out.println();

		if (mouse.equals("A")) mouse_type = "NONE";
		else if (mouse.equals("B")) mouse_type = "MS Compatible 3-Button";
		else if (mouse.equals("C")) mouse_type = "Belkin 3-Button USB Mouse";
		else if (mouse.equals("D")) mouse_type = "Logitech (3-Button) w/ Wheel";
		else if (mouse.equals("E")) mouse_type = "MS Intell-Point Mouse (2-Button)";
		else mouse_type = "NONE";

		/* Operating System */
		System.out.println("Operating System (w/ CD and Manuals):");
		System.out.println("A - NONE");
		System.out.println("B - Microsoft Windows 98SE OEM - $150");
		System.out.println("C - Microsoft Windows NT 4.0 - $275");
		System.out.println("D - Microsoft Windows NT 4.0 & Microsoft Windows 98SE in DUAL BOOT - $425");
		System.out.print("Selection: ");
		String opersys = Console.in.readLine();
		System.out.println();

		if (opersys.equals("A")) opersys_type = "NONE";
		else if (opersys.equals("B")) opersys_type = "Microsoft Windows 98SE OEM";
		else if (opersys.equals("C")) opersys_type = "Microsoft Windows NT 4.0";
		else if (opersys.equals("D")) opersys_type = "Microsoft Windows NT 4.0 & Microsoft Windows 98SE in DUAL BOOT";
		else opersys_type = "NONE";

		// Creates first custom-made computer
		Computer mine = new Computer(compcase_type, processor_type, motherboard_type, memory_type, harddrive_type, dvd_type, soundcard_type, videocard_type, modem_type, monitor_type, diskette_type, speakers_type, keyboard_type, mouse_type, opersys_type);

	        // Tabluate various costs
        	int SUBTOTAL = mine.Cost(compcase, processor, motherboard, memory, harddrive, dvd, soundcard, videocard, modem, monitor, diskette, speakers, keyboard, mouse, opersys);
	        double PST = SUBTOTAL * 0.08;
	        double GST = SUBTOTAL * 0.07;
	        double TOTAL = SUBTOTAL * 1.15;

	        // Correctly rounds to 2 digits
		NumberFormat formatter = NumberFormat.getNumberInstance();
		formatter.setMaximumFractionDigits(2);
        	formatter.setMinimumFractionDigits(2);

	        // Outputs user-selected specifications
        	mine.dumper();

	        // Outputs costs
        	System.out.println("Subtotal: $" + formatter.format(SUBTOTAL));
	        System.out.println("PST:      $" + formatter.format(PST));
	        System.out.println("GST:      $" + formatter.format(GST));
	        System.out.println("Total:    $" + formatter.format(TOTAL));
	}

	public Computer(String a, String b, String c, String d, String e, String f, String g, String h, String i, String j, String k, String l, String m, String n, String o)
	{
		subtotal = 0;
		total = 0;
	}

	public int Cost(String a, String b, String c, String d, String e, String f, String g, String h, String i, String j, String k, String l, String m, String n, String o)
	{
		subtotal = Case(a) + Processor(b) + Motherboard(c) + Memory(d) + Harddrive(e) + CDROM(f) + SoundCard(g) + VideoCard(h) + Modem(i) + Monitor(j) + Diskette(k) + Speakers(l) + Keyboard(m) + Mouse(n) + OperSys(o);
		return subtotal;
	}

	public void dumper()
	{
		System.out.println("Here are the specifications that you chose:");
		System.out.println("Case:             " + compcase_type);
		System.out.println("Processor:        " + processor_type);
		System.out.println("Motherboard:      " + motherboard_type);
		System.out.println("Memory:           " + memory_type);
		System.out.println("Hard Drive:       " + harddrive_type);
		System.out.println("CD/DVD Drive      " + dvd_type);
		System.out.println("Sound Card:       " + soundcard_type);
		System.out.println("Video Card:       " + videocard_type);
		System.out.println("Modem:            " + modem_type);
		System.out.println("Monitor:          " + monitor_type);
		System.out.println("Diskette:         " + diskette_type);
		System.out.println("Speakers:         " + speakers_type);
		System.out.println("Keyboard:         " + keyboard_type);
		System.out.println("Mouse:            " + mouse_type);
		System.out.println("Operating System: " + opersys_type);
		System.out.println();
	}

	public int Case(String a)
	{
		if (a.equals("A")) return 40;
		else if (a.equals("B")) return 50;
		else if (a.equals("C"))	return 75;
		else if (a.equals("D"))	return 75;
		else if (a.equals("E"))	return 100;
		else if (a.equals("F"))	return 100;
		else if (a.equals("G"))	return 155;
		else return 0;
	}

	public int Processor(String a)
	{
		if (a.equals("A")) return 85;
		else if (a.equals("B"))	return 75;
		else if (a.equals("C"))	return 90;
		else if (a.equals("D"))	return 110;
		else if (a.equals("E"))	return 160;
		else if (a.equals("F"))	return 220;
		else if (a.equals("G"))	return 350;
		else if (a.equals("H"))	return 445;
		else if (a.equals("I"))	return 655;
		else if (a.equals("J"))	return 805;
		else if (a.equals("K"))	return 1045;
		else if (a.equals("L"))	return 120;
		else if (a.equals("M"))	return 160;
		else if (a.equals("N"))	return 225;
		else if (a.equals("O"))	return 135;
		else if (a.equals("P"))	return 175;
		else if (a.equals("Q"))	return 240;
		else if (a.equals("R"))	return 250;
		else if (a.equals("S"))	return 345;
		else if (a.equals("T"))	return 385;
		else if (a.equals("U"))	return 520;
		else if (a.equals("V"))	return 685;
		else if (a.equals("W"))	return 495;
		else if (a.equals("X"))	return 685;
		else if (a.equals("Y"))	return 1020;
		else return 0;
	}

	public int Motherboard(String a)
	{
		if (a.equals("A")) return 140;
		else if (a.equals("B"))	return 110;
		else if (a.equals("C"))	return 120;
		else if (a.equals("D")) return 150;
		else if (a.equals("E"))	return 200;
		else if (a.equals("F"))	return 140;
		else if (a.equals("G"))	return 160;
		else if (a.equals("H"))	return 170;
		else if (a.equals("I"))	return 200;
		else if (a.equals("J"))	return 180;
		else if (a.equals("K"))	return 120;
		else if (a.equals("L"))	return 245;
		else if (a.equals("M"))	return 235;
		else return 0;
	}

	public int Memory(String a)
	{
		if (a.equals("A")) return 70;
		else if (a.equals("B"))	return 115;
		else if (a.equals("C"))	return 145;
		else if (a.equals("D"))	return 225;
		else if (a.equals("E"))	return 280;
		else if (a.equals("F"))	return 450;
		else if (a.equals("G"))	return 560;
		else if (a.equals("H"))	return 545;
		else if (a.equals("I"))	return 675;
		else if (a.equals("J"))	return 840;
		else if (a.equals("K"))	return 900;
		else if (a.equals("L"))	return 1120;
		else if (a.equals("M"))	return 1090;
		else if (a.equals("N"))	return 1635;
		else if (a.equals("O"))	return 2180;
		else return 0;
	}

	public int Harddrive(String a)
	{
		if (a.equals("A")) return 135;
		else if (a.equals("B"))	return 160;
		else if (a.equals("C"))	return 180;
		else if (a.equals("D"))	return 175;
		else if (a.equals("E"))	return 185;
		else if (a.equals("F"))	return 200;
		else if (a.equals("G"))	return 210;
		else if (a.equals("H"))	return 300;
		else if (a.equals("I"))	return 375;
		else if (a.equals("J"))	return 485;
		else return 0;
	}

	public int CDROM(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B")) return 65;
		else if (a.equals("C")) return 70;
		else if (a.equals("D"))	return 115;
		else if (a.equals("E"))	return 130;
		else return 0;
	}

	public int SoundCard(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B")) return 0;
		else if (a.equals("C")) return 30;
		else if (a.equals("D"))	return 80;
		else if (a.equals("E")) return 35;
		else if (a.equals("F"))	return 35;
		else if (a.equals("G"))	return 50;
		else if (a.equals("H"))	return 75;
		else if (a.equals("I"))	return 265;
		else return 0;
	}

	public int VideoCard(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B")) return 425;
		else if (a.equals("C"))	return 80;
		else if (a.equals("D"))	return 90;
		else if (a.equals("E"))	return 155;
		else if (a.equals("F"))	return 180;
		else if (a.equals("G"))	return 225;
		else if (a.equals("H"))	return 300;
		else if (a.equals("I"))	return 310;
		else if (a.equals("J"))	return 400;
		else if (a.equals("K"))	return 100;
		else if (a.equals("L"))	return 180;
		else if (a.equals("M"))	return 250;
		else if (a.equals("N"))	return 170;
		else if (a.equals("O"))	return 225;
		else if (a.equals("P"))	return 245;
		else if (a.equals("Q"))	return 300;
		else if (a.equals("R"))	return 130;
		else if (a.equals("S"))	return 175;
		else if (a.equals("T"))	return 335;
		else return 0;
	}

	public int Modem(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B"))	return 0;
		else if (a.equals("C"))	return 80;
		else if (a.equals("D"))	return 50;
		else if (a.equals("E"))	return 60;
		else if (a.equals("F"))	return 110;
		else if (a.equals("G"))	return 30;
		else if (a.equals("H"))	return 50;
		else return 0;
	}

	public int Monitor(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B"))	return 190;
		else if (a.equals("C"))	return 290;
		else if (a.equals("D"))	return 375;
		else if (a.equals("E"))	return 400;
		else if (a.equals("F"))	return 500;
		else if (a.equals("G"))	return 700;
		else if (a.equals("H"))	return 335;
		else if (a.equals("I"))	return 565;
		else if (a.equals("J"))	return 330;
		else if (a.equals("K"))	return 460;
		else if (a.equals("L"))	return 525;
		else if (a.equals("M"))	return 515;
		else if (a.equals("N")) return 750;
		else if (a.equals("O"))	return 1200;
		else if (a.equals("P"))	return 1300;
		else return 0;
	}

	public int Diskette(String a)
	{
		if (a.equals("A")) return 20;
		else if (a.equals("B"))	return 40;
		else if (a.equals("C"))	return 100;
		else return 0;
	}

	public int Speakers(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B")) return 30;
		else if (a.equals("C"))	return 50;
		else if (a.equals("D"))	return 90;
		else if (a.equals("E"))	return 180;
		else if (a.equals("F"))	return 80;
		else if (a.equals("G"))	return 125;
		else if (a.equals("H"))	return 245;
		else if (a.equals("I"))	return 365;
		else return 0;
	}

	public int Keyboard(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B")) return 20;
		else if (a.equals("C"))	return 40;
		else if (a.equals("D")) return 45;
		else if (a.equals("E"))	return 60;
		else return 0;
	}

	public int Mouse(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B"))	return 10;
		else if (a.equals("C")) return 20;
		else if (a.equals("D"))	return 30;
		else if (a.equals("E"))	return 50;
		else return 0;
	}

	public int OperSys(String a)
	{
		if (a.equals("A")) return 0;
		else if (a.equals("B"))	return 150;
		else if (a.equals("C"))	return 275;
		else if (a.equals("D"))	return 425;
		else return 0;
	}
}