Easy Java: Vending Machine Program

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • This tutorial demonstrates how to design a java vending machine program using java from start to finish. These tutorials are for anyone wanting to try and learn this high-level programming language. For this demonstration, I used the Netbeans IDE. Learn to code an easy java vending machine program. All computer science students are welcome. Start learning to code today.
    Java Utilization Program - • Java Credit Utilizatio...
    Tax Program - • Java Wage and Tax GUI
    Check Out More Java Programs!
    Java Toggle Button - • Java Toggle Button Beg...
    Java ComboBox - • Java ComboBox Beginner...
    Java GPA Calculator - • Java: Grades GUI JAVA ...
    Java Grade Finder - • Java Grade Finder
    Java Weight GUI Program - • Easy Java: Java Weight...
    Java GUI Calculations - • Easy Java GUI: Easy Ja...
    Java Input - • Easy Java Program: Get...
    Java Binary Converter Program - • Easy Java 8 Digit Bina...
    Java Grades Program - • Easy Java Grades Progr...
    Java Strings - • Easy Java Strings: Jav...
    Java If/Else - • Easy Java if Else Stat...
    Java GUI JTable - • Easy Java JTable: GUI ...
    Java Euclidean Algorithm Program - • Java Greatest Common D...
    Java Loops - • Easy Java Loops: for, ...
    Java Text File Program - • Easy Java: Create Text...
    Java Check Box, Radio Button Program - • Easy Java: Check Box, ...
    Java Check Box, Radio Button Part 2 - • Easy Java: Check Box, ...
    Java Arrays - • Easy Java Arrays: Begi...
    Java JCombobox Program - • Easy Java JComboBox: B...
    Java Gridlayout Program - • Easy Java GridLayout: ...
    Java Vending Machine Program - • Easy Java: Vending Mac...
    DISCLOSURE: This post may contain affiliate links, meaning when you click the links and make a purchase, we receive a commission.
    Visit: www.codehump.com
    Shop Lenovo: lenovo.vzew.ne...

Комментарии • 71

  • @iqraashraf9973
    @iqraashraf9973 4 года назад +5

    I tried to learn java gui back end coding from many other channels but they dont treat us as a beginner but treat us as a professional......i learn my basics over here i just love it😊😊

  • @bogdangolea1817
    @bogdangolea1817 8 лет назад +2

    I wish to thank you very much for the time invested to teach me how to do a quick and easy vending machine. I appreciate your effort dearly.
    I wish you a wonderful day!

  • @farhantajwar8791
    @farhantajwar8791 4 года назад +2

    Thankyou so much . It works perfectly if you follow each and every step carefully

  • @udhaykumar2989
    @udhaykumar2989 6 лет назад +2

    This program is very helpful for me and thank you

  • @jhonastanjr
    @jhonastanjr 9 лет назад

    Excellent. Clear codes and easy explanation.

  • @NancyBasoahScott
    @NancyBasoahScott 9 лет назад +3

    Great Vending Machine Program.

    • @arsenioscott
      @arsenioscott  9 лет назад

      Nancy Basoah-Scott Thanks for watching

  • @MrTobersheer
    @MrTobersheer 9 лет назад +1

    +arsenio scott what if you want to select 2 or more? please help me with the code snippet.

  • @akshit8725
    @akshit8725 8 лет назад +3

    THank you very much now i can pass my practicals ! you are awesome !

    • @akshit8725
      @akshit8725 5 лет назад

      After 3yrs he is likungy comment😁

    • @jobi077
      @jobi077 2 года назад

      @@akshit8725 and im replying 6 yrs later

    • @akshit8725
      @akshit8725 2 года назад

      @@jobi077 😅

  • @taleyyy29
    @taleyyy29 Год назад

    what are the contents of your vending machine file in the first tab??

  • @zeke4356
    @zeke4356 9 лет назад +3

    Hello!! Awesome tutorial by the way!!! Quick question: how do you do to lets say that your item price is $1.15 or $1.80 or $1.55 how do you get the right change without an error?? Because I noticed that while your price is set to return in quarts values everything is great otherwise not so good. I appreciate your help and I'll be happy to buy you a cup of coffee for your time.

  • @bhavikjain1062
    @bhavikjain1062 6 лет назад +1

    What if in the same program we want to take two different orders at a time but generate two receipt then how to do it?

  • @jessmuelpelimer8771
    @jessmuelpelimer8771 3 года назад

    can someone help me with the decimal format of the change my teacher asked to change the decimals into whatever they want and i cant answer it pls ASAP

  • @buteykobreathing1602
    @buteykobreathing1602 6 лет назад +1

    Hello can you help me please i need to program vending machines for mobile payments whithout internet thanks

  • @dittakavisaibutchiraju9978
    @dittakavisaibutchiraju9978 7 лет назад +1

    Tq for u r code.....
    But a small request is that
    Can u code for change giving in less number of coins???

  • @TeamxReaperz
    @TeamxReaperz 3 года назад

    Not too familiar with GUI development in Java but for me I probably would've had each radio button call the same method. Each radio button would then have a unique ID that gets passed in the ActionEvent.

  • @zinafarid2004
    @zinafarid2004 9 лет назад

    Thanks for your time and help, it worked.

  • @brrrruth
    @brrrruth Год назад

    Your clear button only works once .. like if i hit that button my code just stop working ... I cant purchase anymore it show no change ... Why

  • @samikzr
    @samikzr 9 лет назад +1

    Nice work. Thank you sir.

  • @acevoncruz
    @acevoncruz 3 года назад

    how do you have an alignment guide? is that a plugin?

  • @zinafarid2004
    @zinafarid2004 9 лет назад +3

    Thank you so much, silly me I fixed it I wrote the JOptionpane.showMessageDialog wrong.
    pepssi_rb = new JRadioButton("Pepsi");
    pepssi_rb.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent arg0) {
    if (pepssi_rb.isSelected())
    {
    JOptionPane.showMessageDialog(null,"Enjoy your"+pepssi_rb.getText());
    dietpepssi_rb.setSelected(false);
    mountaindew_rb.setSelected(false);
    drpepper_rb.setSelected(false);
    rootbeer_rb.setSelected(false);
    water_rb.setSelected(false);
    }
    }
    Thank you so much for trying to help I really appreciate that.

    • @arsenioscott
      @arsenioscott  9 лет назад

      zinafarid2004 ok This works to if you want to check it out
      if (rootbeerRB.isSelected()){
      pepsiRB.setSelected(false);
      lemonadeRB.setSelected(false);
      pepsiRB.setSelected(false);
      cokeRB.setSelected(false);
      waterRB.setSelected(false);
      }
      JOptionPane.showMessageDialog(this, " Enjoy You have Selected " + "Root Beer");
      }

  • @rubbyubay_
    @rubbyubay_ 6 лет назад

    MANY THANKS BROS !

  • @JoshuaDixonHolideckVRShowcase
    @JoshuaDixonHolideckVRShowcase 8 лет назад +4

    Very helpful. Thank you soul brother..

    • @jobaptist
      @jobaptist 5 лет назад

      why are you even thanking him.. this program is basically useless and the code is total garbage... in modern software, we can do all this with Artificial intelligence... you just tell the computer what software to create and automatically you will receive the package files in the email...

  • @webaruhazberles
    @webaruhazberles 6 лет назад

    did you see in any machine displayed the menu?

  • @JustinTheVlogger
    @JustinTheVlogger 6 лет назад

    I got an error here:
    private void RootBeerRBActionPerformed(java.awt.event.ActionEvent evt) {
    if (RootBeerRB.isSelected()) {
    CokeRB.setSelected(false);
    WaterRB.setSelected(false);
    LemonadeRB.setSelected(false);
    PepsiRB.setSelected(false);
    SpriteRB.setSelected(false);
    }

  • @Burak-pl1jl
    @Burak-pl1jl 5 лет назад

    I wonder why you didn't use ButtonGroup instead of setting all the other ratio buttons to setSelected(false).

  • @jeffreydelacruz5288
    @jeffreydelacruz5288 6 лет назад

    Did you use looping in this program?

  • @mrlance6575
    @mrlance6575 9 месяцев назад

    it's running but when I purchase more with not enough money it will add money to change

  • @zinafarid2004
    @zinafarid2004 9 лет назад +2

    Nice Work. please make more Java GUI projects or games.

  • @zinafarid2004
    @zinafarid2004 9 лет назад +1

    Thanks for replying back. I mean in your example you used Radio buttons but you didn't put them in group and name that group. I did the same like you, I used radio buttons and then I used event handler for each radio button when I say :
    if (pepssi_rb.isSelected())
    {
    //JOptionPane.showInternalMessageDialog(null,"Enjoy"+title_holder);
    dietpepssi_rb.setSelected(false);
    mountaindew_rb.setSelected(false);
    drpepper_rb.setSelected(false);
    rootbeer_rb.setSelected(false);
    water_rb.setSelected(false);
    }
    JOptionPane is giving me error when I run.

    • @arsenioscott
      @arsenioscott  9 лет назад +1

      zinafarid2004 Ok i see what your trying to do Ill do some tests and let you know what i come up with.

    • @Visionist
      @Visionist 8 лет назад

      Legend says that zinafarid is still waiting till this day.

    • @officialnikoadriansfilmerh7748
      @officialnikoadriansfilmerh7748 5 лет назад

      Lol

  • @goflux
    @goflux 7 лет назад

    Could I get the source code for this? I'm having some issues with the underlying principles, though the video is quite helpful.

  • @estherbgm
    @estherbgm 6 лет назад

    very helpful. thx

  • @angelocabbab1615
    @angelocabbab1615 4 года назад +1

    What programming language is this

    • @arsenioscott
      @arsenioscott  4 года назад

      Java

    • @angelocabbab1615
      @angelocabbab1615 4 года назад

      I have sololearn account and i want to code them but the problem is the java of sololearn has no design page like netbeans
      Thank for your concern im totally beginner

  • @user-xg1cp2zo3l
    @user-xg1cp2zo3l 9 лет назад

    nice working! can i make it integer? instead of double?

    • @dheerajlxst9141
      @dheerajlxst9141 8 лет назад

      you can use integers indeed but they are whole numers like 1, 2 or 50

  • @patrickdadon5794
    @patrickdadon5794 8 лет назад

    Bro its saying can ind main method can you help me

  • @sunday1220
    @sunday1220 6 лет назад

    what if there's no money being input?

  • @christinabyssinia894
    @christinabyssinia894 4 года назад +1

    How to get the source code 😢😢😢🤦‍♀️🙇‍♀️

  • @zinafarid2004
    @zinafarid2004 9 лет назад

    Please how can I get the JRadioButtons text without grouping them. Can I have your email to show you my vending machine work, I am stuck on displaying JOptionPane message saying " Enjoy your diet pepsi" for example after selecting a radio button.

    • @arsenioscott
      @arsenioscott  9 лет назад

      zinafarid2004 Lets figure this out what do you mean when you say you don't want to group them together

  • @butterchicken6803
    @butterchicken6803 6 лет назад +1

    Some asmr right here

  • @leonegieporgadas1766
    @leonegieporgadas1766 9 лет назад

    can you please sent me a code of that vending machine. as soon as possible. thank you.

  • @hajaranis4373
    @hajaranis4373 6 лет назад

    can i get the source code ?

  • @khalidahmed9581
    @khalidahmed9581 3 года назад

    I need this but in python I have it due in 2 days

  • @lilcarlitos2231
    @lilcarlitos2231 9 лет назад +1

    Wow nice voice I wish I had yours

    • @arsenioscott
      @arsenioscott  9 лет назад

      UnluckyPickle 7 Thanks for the compliment

  • @carvelbell181
    @carvelbell181 8 лет назад

    I enjoy this project. Please send me the source code.

  • @udhaykumar2989
    @udhaykumar2989 6 лет назад +1

    You're Nice man!
    I want to make Happy Shopping and help me!

  • @salihainfo1467
    @salihainfo1467 5 лет назад

    merci mais l'ecriture ,'est pas claire

  • @MsZiel
    @MsZiel 8 лет назад

    Can you please give me the source code please I'm wholeheartedly begging you

    • @srinut3460
      @srinut3460 7 лет назад

      hi, please send me the source code. my mail address is srinutech555@gmail.com

  • @tejlim1822
    @tejlim1822 6 лет назад

    I smell OOP2-3 cause of this

  • @asleepius
    @asleepius 9 лет назад +2

    Coke and Pepsi in the same vending machine?

  • @silentthriller
    @silentthriller 5 лет назад

    WTF? This is drag and drop shit. We actually have to write the code.