Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.util.*;
- public class arar {
- public static void main(String[] args) {
- JOptionPane.showMessageDialog(null, "Welcome to Davao Online PC Market!");
- int inta = 3300, intb = 4500, intc = 6000, intd = 8500, inte = 3000, intf = 5650; ; String a,b,c,d,e,f,g = null;
- Object[] possibleValues = { "LED Monitors", "Motherboards", "Processors", "RAMs", "Video Cards" };
- Object selectedValue = JOptionPane.showInputDialog(null, "Choose Product Category", "DOPCM",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues,
- possibleValues[0]);
- if (selectedValue=="LED Monitors"){
- Object[] possibleValues1 = {"AOC", "Asus", "LG", "DELL" };
- Object selectedValue1 = JOptionPane.showInputDialog(null, "Choose Brand", "LED Monitors",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues1,
- possibleValues1[0]);
- if (selectedValue1=="AOC"){
- Object[] possibleValues10 = { a = "e1670swu (18.5inch)", b = "Second e950swn (20inch)", c = "e2060swn (22inch)" };
- Object selectedValue10 = JOptionPane.showInputDialog(null, "Choose Model", "AOC",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues10,
- possibleValues10[0]);
- if (selectedValue10==a){
- Object[] options1 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + inta, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options1, options1[0]);
- }
- if (selectedValue10==b){
- Object[] options2 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intb, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options2, options2[0]);}
- if (selectedValue10==c){
- Object[] options3 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intc, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options3, options3[0]);}
- }
- if (selectedValue1=="Asus") {
- Object[] possibleValues11 = {d = "PB278Q (27inch)", e = "PA248Q (Vertical monitor 22inch)", f = "SD222-YA (21.5 inch)" };
- Object selectedValue11 = JOptionPane.showInputDialog(null, "Choose Model", "Asus",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues11,
- possibleValues11[0]);
- if (selectedValue11==d){
- Object[] options1 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intd, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options1, options1[0]);}
- if (selectedValue11==e){
- Object[] options2 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + inte, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options2, options2[0]);}
- if (selectedValue11==f){
- Object[] options3 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intf, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options3, options3[0]);}
- }
- if (selectedValue1=="LG") {
- Object[] possibleValues12 = { "25UM65-P (25inch)", "29UM65-P (29inch)", "22MP56HQ-P (22inch)" };
- Object selectedValue12 = JOptionPane.showInputDialog(null, "Choose Model", "LG",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues12,
- possibleValues12[0]); }
- if (selectedValue1=="DELL") {
- Object[] possibleValues13 = { "S2240T (22 inch)", "S2340L (23 inch)", "ST2420L (24 inch)" };
- Object selectedValue13 = JOptionPane.showInputDialog(null, "Choose Model", "LG",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues13,
- possibleValues13[0]);
- }
- }
- else if (selectedValue=="Motherboards") {
- Object[] possibleValues2 = { "Gigabyte", "MSI", "ASRock"};
- Object selectedValue2 = JOptionPane.showInputDialog(null, "Choose Brand", "Motherboards",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues2,
- possibleValues2[0]);
- if (selectedValue2=="Gigabyte"){
- Object[] possibleValues21 = { "f2a55m-ds2" , "ga-h61m-ds2" , "ga-f2a88xm-hd3"};
- Object selectedValues21 = JOptionPane.showInputDialog(null, "Choose Model", "Gigabyte",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues21,
- possibleValues21[0]);}
- if (selectedValue2=="MSI"){
- Object[] possibleValues22 = { "787-GD65 Gaming", "Z77a-G43", "Z87-G45 Gaming"};
- Object selectedValue22 = JOptionPane.showInputDialog(null, "Choose Model", "MSI",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues22,
- possibleValues22[0]);}
- if (selectedValue2=="ASRock"){
- Object[] possibleValues23 = { "g41m-vs3", "g41c-gs", "960gc-gs fx" };
- Object selectedValue23 = JOptionPane.showInputDialog(null, "Choose Model", "ASRock",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues23,
- possibleValues23[0]);}
- }
- else if (selectedValue=="Processors"){
- Object[] possibleValues3 = { "Intel", "Amd"};
- Object selectedValue3 = JOptionPane.showInputDialog(null, "Choose Brand", "Processors",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues3,
- possibleValues3[0]);
- if (selectedValue3=="Intel"){
- Object[] possibleValues31 = { "Core i3", "Core i5" ,"Core i7"};
- Object selectedValue31 = JOptionPane.showInputDialog(null, "Choose Model", "Intel",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues31,
- possibleValues31[0]);}
- if (selectedValue3=="Amd"){
- Object[] possibleValues32 = { "a6" ,"a8", "a10"};
- Object selectedValue32 = JOptionPane.showInputDialog(null, "Choose Model", "Amd",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues32,
- possibleValues32[0]);}
- }
- else if (selectedValue=="RAMs") {
- Object[] possibleValues4 = { "Crucial" , "Gskill" ,"Corsair" };
- Object selectedValue4 = JOptionPane.showInputDialog(null, "Choose Brand", "RAMs",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues4,
- possibleValues4[0]);
- if (selectedValue4=="Crucial"){
- Object[] possibleValues41 = { "Crucial Ballistix 1x8gb 1866mhz" , "Crucial Ballistix Tactical Tracer 2x4gb 1866mhz" };
- Object selectedValue41 = JOptionPane.showInputDialog(null, "Choose Model", "Crucial",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues41,
- possibleValues41[0]);}
- if (selectedValue4=="Gskill"){
- Object[] possibleValues42 = { "Gskill Ripjaw 1x4gb 1600mhz" ," Gskill ripjaws X 2x4gb 1866mhz", "Gskill (No HSF) 1x2gb 1333mhz"};
- Object selectedValue42 = JOptionPane.showInputDialog(null, "Choose Model", "Gskill",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues42,
- possibleValues42[0]);}
- if (selectedValue4=="Corsair"){
- Object[] possibleValues43 = {"Corsair Vengence blur 1x4gb 1600mhz", "Corsair XMS 4x4gb 1866mhz", "Corsair Dominator 2x8gb 1866mhz"};
- Object selectedValue43 = JOptionPane.showInputDialog(null, "Choose Model", "Corsair",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues43,
- possibleValues43[0]);}
- }
- else if (selectedValue=="Video Cards") {
- Object[] possibleValues5 = { "EVGA", "Sapphire" ,"PowerColor", "Asus" };
- Object selectedValue5 = JOptionPane.showInputDialog(null, "Choose Brand", "Video Cards",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues5,
- possibleValues5[0]);
- if (selectedValue5=="EVGA"){
- Object[] possibleValues51 = {"EVGA gtx 560ti", "EVGA gtx 650", "EVGA 680ti"};
- Object selectedValue51 = JOptionPane.showInputDialog(null, "Choose Model", "EVGA",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues51,
- possibleValues51[0]);}
- if (selectedValue5=="Sapphire"){
- Object[] possibleValues52 = {"Sapphire hd 7730", "Sapphire hd 7750", "Sapphire hd 7770"};
- Object selectedValue52 = JOptionPane.showInputDialog(null, "Choose Model", "Sapphire",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues52,
- possibleValues52[0]);}
- if (selectedValue5=="PowerColor"){
- Object[] possibleValues53 = {"PowerColor hd 7790", "PowerColor hd 6850", "PowerColor hd 6870"};
- Object selectedValue53 = JOptionPane.showInputDialog(null, "Choose Model", "PowerColor",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues53,
- possibleValues53[0]);}
- if (selectedValue5=="Asus"){
- Object[] possibleValues54 = {"Asus gtx 780ti" ,"Asus gtx Titan", "Asus gtx Titan Black"};
- Object selectedValue54 = JOptionPane.showInputDialog(null, "Choose Model", "Asus",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues54,
- possibleValues54[0]);}
- }
- }
- }
- import javax.swing.*;
- import java.util.*;
- public class arar {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- JOptionPane.showMessageDialog(null, "Welcome to Davao Online PC Market!");
- int inta = 3300, intb = 4500, intc = 6000, intd = 8500, inte = 3000, intf = 5650; ; String a,b,c,d,e,f,g = null;
- Object[] possibleValues = { "LED Monitors", "Motherboards", "Processors", "RAMs", "Video Cards" };
- Object selectedValue = JOptionPane.showInputDialog(null, "Choose Product Category", "DOPCM",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues,
- possibleValues[0]);
- if (selectedValue=="LED Monitors"){
- Object[] possibleValues1 = {"AOC", "Asus", "LG", "DELL" };
- Object selectedValue1 = JOptionPane.showInputDialog(null, "Choose Brand", "LED Monitors",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues1,
- possibleValues1[0]);
- if (selectedValue1=="AOC"){
- Object[] possibleValues10 = { a = "e1670swu (18.5inch)", b = "Second e950swn (20inch)", c = "e2060swn (22inch)" };
- Object selectedValue10 = JOptionPane.showInputDialog(null, "Choose Model", "AOC",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues10,
- possibleValues10[0]);
- if (selectedValue10==a){
- Object[] options1 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + inta, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options1, options1[0]);
- }
- if (selectedValue10==b){
- Object[] options2 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intb, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options2, options2[0]);}
- if (selectedValue10==c){
- Object[] options3 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intc, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options3, options3[0]);}
- }
- if (selectedValue1=="Asus") {
- Object[] possibleValues11 = {d = "PB278Q (27inch)", e = "PA248Q (Vertical monitor 22inch)", f = "SD222-YA (21.5 inch)" };
- Object selectedValue11 = JOptionPane.showInputDialog(null, "Choose Model", "Asus",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues11,
- possibleValues11[0]);
- if (selectedValue11==d){
- Object[] options1 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intd, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options1, options1[0]);}
- if (selectedValue11==e){
- Object[] options2 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + inte, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options2, options2[0]);}
- if (selectedValue11==f){
- Object[] options3 = { "OK", "CANCEL" };
- JOptionPane.showOptionDialog(null, "Price is: " + intf, "Confirmation",
- JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null,
- options3, options3[0]);}
- }
- if (selectedValue1=="LG") {
- Object[] possibleValues12 = { "25UM65-P (25inch)", "29UM65-P (29inch)", "22MP56HQ-P (22inch)" };
- Object selectedValue12 = JOptionPane.showInputDialog(null, "Choose Model", "LG",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues12,
- possibleValues12[0]); }
- if (selectedValue1=="DELL") {
- Object[] possibleValues13 = { "S2240T (22 inch)", "S2340L (23 inch)", "ST2420L (24 inch)" };
- Object selectedValue13 = JOptionPane.showInputDialog(null, "Choose Model", "LG",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues13,
- possibleValues13[0]);
- }
- }
- else if (selectedValue=="Motherboards") {
- Object[] possibleValues2 = { "Gigabyte", "MSI", "ASRock"};
- Object selectedValue2 = JOptionPane.showInputDialog(null, "Choose Brand", "Motherboards",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues2,
- possibleValues2[0]);
- if (selectedValue2=="Gigabyte"){
- Object[] possibleValues21 = { "f2a55m-ds2" , "ga-h61m-ds2" , "ga-f2a88xm-hd3"};
- Object selectedValues21 = JOptionPane.showInputDialog(null, "Choose Model", "Gigabyte",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues21,
- possibleValues21[0]);}
- if (selectedValue2=="MSI"){
- Object[] possibleValues22 = { "787-GD65 Gaming", "Z77a-G43", "Z87-G45 Gaming"};
- Object selectedValue22 = JOptionPane.showInputDialog(null, "Choose Model", "MSI",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues22,
- possibleValues22[0]);}
- if (selectedValue2=="ASRock"){
- Object[] possibleValues23 = { "g41m-vs3", "g41c-gs", "960gc-gs fx" };
- Object selectedValue23 = JOptionPane.showInputDialog(null, "Choose Model", "ASRock",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues23,
- possibleValues23[0]);}
- }
- else if (selectedValue=="Processors"){
- Object[] possibleValues3 = { "Intel", "Amd"};
- Object selectedValue3 = JOptionPane.showInputDialog(null, "Choose Brand", "Processors",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues3,
- possibleValues3[0]);
- if (selectedValue3=="Intel"){
- Object[] possibleValues31 = { "Core i3", "Core i5" ,"Core i7"};
- Object selectedValue31 = JOptionPane.showInputDialog(null, "Choose Model", "Intel",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues31,
- possibleValues31[0]);}
- if (selectedValue3=="Amd"){
- Object[] possibleValues32 = { "a6" ,"a8", "a10"};
- Object selectedValue32 = JOptionPane.showInputDialog(null, "Choose Model", "Amd",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues32,
- possibleValues32[0]);}
- }
- else if (selectedValue=="RAMs") {
- Object[] possibleValues4 = { "Crucial" , "Gskill" ,"Corsair" };
- Object selectedValue4 = JOptionPane.showInputDialog(null, "Choose Brand", "RAMs",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues4,
- possibleValues4[0]);
- if (selectedValue4=="Crucial"){
- Object[] possibleValues41 = { "Crucial Ballistix 1x8gb 1866mhz" , "Crucial Ballistix Tactical Tracer 2x4gb 1866mhz" };
- Object selectedValue41 = JOptionPane.showInputDialog(null, "Choose Model", "Crucial",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues41,
- possibleValues41[0]);}
- if (selectedValue4=="Gskill"){
- Object[] possibleValues42 = { "Gskill Ripjaw 1x4gb 1600mhz" ," Gskill ripjaws X 2x4gb 1866mhz", "Gskill (No HSF) 1x2gb 1333mhz"};
- Object selectedValue42 = JOptionPane.showInputDialog(null, "Choose Model", "Gskill",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues42,
- possibleValues42[0]);}
- if (selectedValue4=="Corsair"){
- Object[] possibleValues43 = {"Corsair Vengence blur 1x4gb 1600mhz", "Corsair XMS 4x4gb 1866mhz", "Corsair Dominator 2x8gb 1866mhz"};
- Object selectedValue43 = JOptionPane.showInputDialog(null, "Choose Model", "Corsair",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues43,
- possibleValues43[0]);}
- }
- else if (selectedValue=="Video Cards") {
- Object[] possibleValues5 = { "EVGA", "Sapphire" ,"PowerColor", "Asus" };
- Object selectedValue5 = JOptionPane.showInputDialog(null, "Choose Brand", "Video Cards",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues5,
- possibleValues5[0]);
- if (selectedValue5=="EVGA"){
- Object[] possibleValues51 = {"EVGA gtx 560ti", "EVGA gtx 650", "EVGA 680ti"};
- Object selectedValue51 = JOptionPane.showInputDialog(null, "Choose Model", "EVGA",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues51,
- possibleValues51[0]);}
- if (selectedValue5=="Sapphire"){
- Object[] possibleValues52 = {"Sapphire hd 7730", "Sapphire hd 7750", "Sapphire hd 7770"};
- Object selectedValue52 = JOptionPane.showInputDialog(null, "Choose Model", "Sapphire",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues52,
- possibleValues52[0]);}
- if (selectedValue5=="PowerColor"){
- Object[] possibleValues53 = {"PowerColor hd 7790", "PowerColor hd 6850", "PowerColor hd 6870"};
- Object selectedValue53 = JOptionPane.showInputDialog(null, "Choose Model", "PowerColor",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues53,
- possibleValues53[0]);}
- if (selectedValue5=="Asus"){
- Object[] possibleValues54 = {"Asus gtx 780ti" ,"Asus gtx Titan", "Asus gtx Titan Black"};
- Object selectedValue54 = JOptionPane.showInputDialog(null, "Choose Model", "Asus",
- JOptionPane.INFORMATION_MESSAGE,
- null, possibleValues54,
- possibleValues54[0]);}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement