Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

The project is optional. It is worth at least 7 bonus points beyond overall 100 points of this course. The grading will be on a pass/fail basis.

Write a Java application (not applet) to simulate a Vending Machine. This is a GUI program. A user can buy a bottle of water ($1.00), or a can of Coke ($1.25), or a bottle of Sprite ($1.50), or a bottle of root beer ($2.25), or a chocolate bar ($2.50). To make program simple, we assume that a user can buy only one item each time. Additionally, we assume there are only ten units for each item in the machine.

At the top of window, your program should have an interface for users to select item. It could be the selection panel of a real vending machine, which includes keys of A, B, 0, 1, 2, ..., and 9. Or you can use an option list, or a selection menu.

Next, the window should have a portion for the user to insert money. A user can insert a nickel, a dime, a quarter, or a dollar bill by clicking (or pushing the mnemonic key) a corresponding button. You program should record the total inserted amount. Credit card is not allowed.

Then, there should be a purchase button and an exit button. After pushing purchase button, your program will compare the money inserted to the price of selected item. If the former is greater or equal to the latter, then the program should print "xxx item has been dropped to the bottom. You change is xxx.xx." If not, a message will be displayed to tell the user insert more. If one item is sold out, a prompt for changing item to buy should be displayed.

Use bonus + Your Last Name + First Letter of Your First Name as the project name. Note that no space or special character is allowed in the name and all letters should be lower case. Zip the entire project directory into a .zip file and upload it to the Bonus folder in the Blackboard Assignments. You must include all subfolders and reserve the directory structure.

 Note:

  • Use hw4 + Your Last Name + First Letter of Your First Name as the project name. Note that no space or special character is allowed in the name and all letters should be lower case. For instance, for me, the name should be hw4dingw.
  • Zip the entire project directory into a .zip file for each project. For each project, you must include all subfolders and reserve the directory structure. Then upload both zip files to Assignments → Homework4 in the Blackboard. You MUST submit through Blackboard, unless in case it is too late. Otherwise 10 points will be deducted.
  • At the very beginning of your source file of the test class, in the comment, you should put your full name, the course number and name, the number of homework (here it is Homework4), the problem number, and the date of last successful debugging. Two points will be cut for each project without this information.
  • You MUST use Eclipse as IDE.
  • Each program MUST compile and run without error.

 

Write a Java applet using swing components to calculate and reserve a room at My Favorite Hotel. The applet should contain the following

  • Display today's (not today but the day the Java program is called)
  • Day of arrival è textfield (MMDDYYYY) edit for reasonable validity
  • Number of nights è textfield edit for validity (should be 1 through 30)
  • Drop down box for the number of people (1 through 4)
  • Drop box for Regular, Deluxe, or Suite
  • Radio button for 1 king size bed or 2 queen size beds
  • Radio button for Smoking or Non-Smoking or Any available
  • Button to check availability and calculate charge (you don't have to check availability unless you want to research interfacing to a Access or Excel)
  • Button to reserve - Will come back with a confirmation number and confirmation of inputted information (You don't have to reserve however unless you want to research)
  • The charges for the rooms are $110 for regular, $120 for deluxe, and $150 for suite. $15 extra per person will be charged for more then 2 people, and there is a 13.5% tax.
  • All editing should respond with the proper error.

 

Java, Programming

  • Category:- Java
  • Reference No.:- M9522681

Have any Question?


Related Questions in Java

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As