Jump to content

PugoOfficial

Member
  • Posts

    72
  • Joined

  • Last visited

Everything posted by PugoOfficial

  1. Can someone tell me what is hierarchy of operators (in infix,prefix,postfix notations)
  2. Well I'm just using the size of 1 for testing I could change that anytime you know
  3. How do I make the program confirm if the input of the user is correct or wrong(Username and Password) ? Appreciate it if someone actually showed me the solution .. The Aim of the program is to make the user to register(if they don't have an account yet) then log in then exit. import java.io.*; public class Login { public static void main (String [] args) throws IOException { BufferedReader fc = new BufferedReader(new InputStreamReader(System.in)); String RegUsers[] = new String[1]; String RegPass[] = new String[1]; boolean loop = true; while(loop == true) { boolean choose = true; while (choose == true) { System.out.println("[1]Register a new Account [2]Login an existing Account [3]Exit"); int z = Integer.parseInt(fc.readLine()); if (z == 1) { int x = 0; while(RegUsers[x] !=null) { x++; } System.out.println("Enter your username: "); RegUsers[x] = fc.readLine(); System.out.println("Enter your password: "); RegPass[x] = fc.readLine(); for(int i = 0; i<RegUsers.length; i++) { System.out.println(RegUsers[i]); } } else if (z == 2) { System.out.println("Enter your username: "); String user = fc.readLine(); System.out.println("Enter your password: "); String pass = fc.readLine(); } else { System.out.println("Program Terminated!"); choose = false; } loop = false; } } } }
  4. Do I need to uninstall existing AMD Driver to Install a new one?
  5. Need a party or group or we could form one My Friend ID: 198149458
  6. Honestly, there the questions in an exam I'm about to take that I can't find the answers for. If you can't help I understand it's kind of cheating i know but I would want to get a higher grade
  7. I'm asking here because I can't find it on Google on what codes/types are they Q1:is the type of exception thrown when a application stops running before its natural end. Q2:User Exceptions are exceptions that are manually thrown by the programmer using what? Q3:can the 'trycatch' block be nested? LastQ: Can Exceptions be generated through methods calls? if not .. what can? Thanks in Advance for those who can answer
  8. Ok I understand here's my problem now .. import java.io.*; class Change { public static void main (String [] args) throws IOException { System.out.println("Please enter the cost of the item:"); BufferedReader fc = new BufferedReader (new InputStreamReader(System.in)); String cost = fc.readLine(); double z = Double.parseDouble(cost); System.out.println("Cost of the item: " +z); } } I don't know how to add the tax to the price of the item the user entered.
  9. So here's the question .. (Sorry I was absent that day that's why I couldn't understand what methods/attributes to use I'm so Confused if someone can give me a program I'll try to understand it ) - Write a Java Program that calculates the change for a cashier. The Program requests the cost of the item. The user then types in the cost. The Program then outputs the cost of the item including the sales tax (6% as the tax value). The program next requests and receives the amount tendered by the customer. Finally the program outputs the summary of all figures including the amount of change due to the customer
  10. Sorry I don't know how to add pictures here si here's a link: http://imgur.com/S3eTsXO
  11. I don't know if it's my monitor or the game but everytime I start "Wolfenstein: The New Order" my monitor displays D-Sub Out of range 59.6KHz/60.0KHz this only happens in Wolfenstein my other games have no problem any solution ? I already tried installing and unistalling the game.
  12. As the title says my Antivirus is blocking my Applications like Steam and other games and when I download something from the web or update my flash player it wont let it says it has trojan or a virus already tried to unistall and reinstall should I replace my anti virus or just disable it because my system works fine if it's disabled but i'm worried about something might happen if it's disabled
  13. Wait for team red's offers you never know it might be better
  14. Hi Guys! I don't know much about storage and stuff about it, but I'm looking for the best bang for the buck Portable External Storage Device my budget is $70 But willing to add if it's really that good
  15. Thanks @kichilron I just made spacing illusion (filled it with System.out.println() But one more thing unanswered is how do I make the user(the guest) input his INFORMATION when checking in or inquiring and save it inside the system for example Mr.Guest is already occupying this room or this room is unavailable Edit: Sorry for having to many question but when I press 2 and prints it's features and if I choose back it goes back to the marimar bay sands how do I make it return to the list of rooms
  16. So here's the codes: How can I make the program not show the previous printed features of the room when the user chooses to back and another question how do I make the program input the user's(guest) info and saves it in the system thanks in advance! PS: I am using Java(JCreator LE) import java.io.*;public class Reservation{ public static void main(String[]args)throws IOException{ main(); } public static void main() throws IOException{ System.out.println("\n================== WELCOME TO Marimar Bay Sands Hotel! =========================\n"); System.out.println("\tAt Marimar Bay Sands Hotel all room types are tastefully\n\tdecorated and fully furnished, ensuring the highest level\n\tof comfortand tranquility to each guest.\n"); System.out.println("1 : List of Rooms"); System.out.println("2 : Inquiry\n"); int x; BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); x = Integer.parseInt(br.readLine()); int y= rooms(x); } public static int rooms(int x) throws IOException{ BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); if (x == 1){ System.out.println("\n========================= Standard Collection ==============================\n"); System.out.println("1 : Single Room"); System.out.println("2 : Double Room"); System.out.println("3 : Junior Suite"); System.out.println("4 : Family Suite"); System.out.println("6 : Grande Suite"); System.out.println("\n========================= Premier Collection ==============================\n"); System.out.println("6 : Premier Double Room"); System.out.println("7 : Premier Junior Suite"); System.out.println("8 : Honeymoon Suite"); System.out.println("9 : Penthouse Suite"); System.out.println("10 : Presidential Suite"); int room; BufferedReader rr = new BufferedReader(new InputStreamReader(System.in)); room = Integer.parseInt(rr.readLine()); System.out.println(""); switch (room) { case 1: System.out.println("\nSingle Room"); System.out.println("* Double bed"); System.out.println("* Sitting corner with Sofa or Armchairs"); System.out.println("* Bathroom with Shower"); System.out.println("* Branded bath amenities"); System.out.println("* Hairdryer"); System.out.println("* Bathrobes and Slippers"); System.out.println("* Safe Deposit Box"); System.out.println("* LCD TV with satellite channels"); System.out.println("* Mini-Bar"); System.out.println("* Air conditioning"); System.out.println("* Steamer & amenities for making Coffee & Tea"); System.out.println("* Balcony or Terrace"); System.out.println("\n\n0 : Back to the List of Rooms"); int b1; BufferedReader r1 = new BufferedReader(new InputStreamReader(System.in)); b1 = Integer.parseInt(r1.readLine()); if ( b1 == 0) { System.out.print(""); } rooms(room); break; case 2: System.out.println("\nDouble Room"); System.out.println("* Double or Twin beds"); System.out.println("* Sitting corner with Sofa or Armchairs"); System.out.println("* Bathroom with Shower"); System.out.println("* Branded bath amenities"); System.out.println("* Hairdryer"); System.out.println("* Bathrobes and Slippers"); System.out.println("* Safe Deposit Box"); System.out.println("* LCD TV with satellite channels"); System.out.println("* Mini-Bar"); System.out.println("* Air conditioning"); System.out.println("* Steamer & amenities for making Coffee & Tea"); System.out.println("* Balcony or Terrace"); System.out.println("\n\n0 : Back to the List of Rooms"); int b2; BufferedReader r2 = new BufferedReader(new InputStreamReader(System.in)); b2 = Integer.parseInt(r2.readLine()); if ( b2 == 0) { System.out.print(""); } rooms(room); break; case 3: System.out.println("\nJunior Suite"); System.out.println("Separate Bedroom"); System.out.println("* Living Room"); System.out.println("* Bathroom with Shower"); System.out.println("* Branded bath amenities"); System.out.println("* Hairdryer"); System.out.println("* Bathrobes and Slippers"); System.out.println("* Safe Deposit Box"); System.out.println("* 2 LCD TVs with satellite channels"); System.out.println("* Mini-Bar"); System.out.println("* Air conditioning"); System.out.println("* Steamer & amenities for making Coffee & Tea"); System.out.println("* Balcony or Terrace"); System.out.println("\n\n0 : Back to the List of Rooms"); int b3; BufferedReader r3 = new BufferedReader(new InputStreamReader(System.in)); b3 = Integer.parseInt(r3.readLine()); if ( b3 == 0) { System.out.print(""); } rooms(room); break; case 4: System.out.println("\nFamily Suite"); System.out.println("* 2 Separate Bedrooms (1 with king size bed and 1 with bunk beds)"); System.out.println("* Living Room"); System.out.println("* 1 Bathroom with Shower"); System.out.println("* Branded bath amenities"); System.out.println("* Hairdryer"); System.out.println("* Bathrobes and Slippers"); System.out.println("* Safe Deposit Box"); System.out.println("* 2 LCD TVs with satellite channels"); System.out.println("* Mini-Bar"); System.out.println("* Air conditioning"); System.out.println("* Steamer & amenities for making Coffee & Tea"); System.out.println("* Balcony or Terrace"); System.out.println("\n\n0 : Back to the List of Rooms"); int b7; BufferedReader r7 = new BufferedReader(new InputStreamReader(System.in)); b7 = Integer.parseInt(r7.readLine()); if ( b7 == 0) { System.out.print(""); } rooms(room); break; case 5: System.out.println("\nGrande Suite"); System.out.println(""); System.out.println("\n\n0 : Back to the List of Rooms"); int b8; BufferedReader r8 = new BufferedReader(new InputStreamReader(System.in)); b8 = Integer.parseInt(r8.readLine()); if (b8 == 0) { System.out.print(""); } rooms(room); break; case 6: System.out.println("\nPremier Double Room"); System.out.println("* Magnificent View to the foothills of Mountain Pirin"); System.out.println("* Modern Italian designed furniture and cozy decoration"); System.out.println("* Double Bed"); System.out.println("* Sitting corner with Sofa or Armchairs"); System.out.println("* Bathroom with Shower"); System.out.println("* Luxury brand bath amenities"); System.out.println("* Hairdryer"); System.out.println("* Bathrobes and Slippers"); System.out.println("* Safe Deposit Box"); System.out.println("* LCD TV 32’’ with satellite channels & DVD player"); System.out.println("* Mini-Bar"); System.out.println("* Air conditioning"); System.out.println("* Steamer & amenities for making Coffee & Tea"); System.out.println("* Breakfast in room (upon request)"); System.out.println("* Early purchase of ski center passes, no waiting in queue required"); System.out.println("\n\n0 : Back to the List of Rooms"); int b9; BufferedReader r9 = new BufferedReader(new InputStreamReader(System.in)); b9 = Integer.parseInt(r9.readLine()); if ( b9 == 0) { System.out.print(""); } rooms(room); break; case 7: System.out.println("\nPremier Junior Suite"); System.out.println(""); System.out.println("\n\n0 : Back to the List of Rooms"); int b10; BufferedReader r10 = new BufferedReader(new InputStreamReader(System.in)); b10 = Integer.parseInt(r10.readLine()); if ( b10 == 0) { System.out.print(""); } rooms(room); break; case 8: System.out.println("\nHoneymoon Room"); System.out.println(""); System.out.println("\n\n0 : Back to the List of Rooms"); int b11; BufferedReader r11 = new BufferedReader(new InputStreamReader(System.in)); b11 = Integer.parseInt(r11.readLine()); if ( b11 == 0) { System.out.print(""); } rooms(room); break; case 9: System.out.println("\nPenthouse Suites"); System.out.println(""); System.out.println("\n\n0 : Back to the List of Rooms"); int b14; BufferedReader r14 = new BufferedReader(new InputStreamReader(System.in)); b14 = Integer.parseInt(r14.readLine()); if ( b14 == 0) { System.out.print(""); } rooms(room); break; case 10: System.out.println("\nPresidential Suites"); System.out.println(""); System.out.println("\n\n0 : Back to the List of Rooms"); int b15; BufferedReader r15 = new BufferedReader(new InputStreamReader(System.in)); b15 = Integer.parseInt(r15.readLine()); if ( b15 == 0) { System.out.print(""); } rooms(room); break; } main(); } else if (x == 2){ System.out.println ("RESRVATION!!!"); } else{ System.out.println("Thank You!"); } return x; } public static int prod(int x) throws IOException{ return x; } }
  17. Is it OK for Windows Firewall to be ON always or OFF or ON for public and OFF for private or vice-versa any disadvantages I might get or Advantages?
  18. So just copy his common folder and paste it in my SteamApps? and do I need to stop downloading dota2 or it will auto-update my current dota2?
  19. Hi Guys! How do I properly Copy~paste DotA2(from my classmate) to my PC. since my net is so slow I resorted to this option
  20. 100% Verified. Thanks anyways I just found out there was a recent update earlier (108MB) maybe that's the cause. well time to start over again
  21. Well last night I was gonna go to sleep and shut down my computer so I paused the download and hoping to continue tomorrow but when I opened steam once more there 100MB/6.2GB
  22. Help Guys I'm downloading DotA2 in Steam but last time I checked it was 1.8GB/6.2GB then tomorrow I was about to resume it started at 100MB what's happening?
  23. How to add an option in java for example the user or guest will check for room price in a hotel but he or she doesnt want that room how do i make the program go back to list of choices of rooms
×