RECYCLING SYSTEM IN JAVA WITH BLUEJ

RECYCLING SYSTEM IN JAVA WITH BLUEJ

Recycling System

The system, you are going to write, simulates a reverse vending machine. Such a machine is used to identify and collect used beverage containers for recycling or reuse from customers, who in return receive a monetary refund. When you use the system, you enter different cans and bottles into the machine, and when you are finished, you ?press a button? to get a refund ticket.

In the first iteration we assume that there are three different types of bottles or cans:

Deposit A: Cans and bottles less than 1 litre DKK 1,00

Deposit B: Exception. Bottles of plastics 0,5 litre DKK 1,50

Deposit C: Cans and bottles on or more than 1 litre DKK 3,00

The recycling machine has to be implemented in two classes: ReturnItem and ReturnMachine.

The cans and bottles are implemented in the class Container. Unless it is mentioned in the description below, you decide the names of the fields, parameters, variables and the methods, but it is important that the names you choose are appropriate.

The ReturnItem class should have the following characteristics:

Fields:

A character field storing the type of return item, e.g. ?A?, ?B? or ?C?

A character field storing a text describing the return item

An integer field storing the deposit value in ?øre?

An integer field storing the number of items returned for this type of item

Constructors:

A constructor having three parameters, initialising the two text fields and the deposit value field. The last field should also be initialised.

Accessor methods: Four different methods returning each of the fields

A method toString() that returns a String object as a concatenation of all the fields in a readable form

Mutator methods:

A method that increments the number of returned items when its type of return item is entered into the machine

A method setting the deposit value to the value passed as a parameter. The parameter value has to be checked, so it is positive and payable in coins (it has to be dividable by 50)

A method that resets this type of return item, e.g. the number of items returned is set to 0

View Answers









Related Tutorials/Questions & Answers:
RECYCLING SYSTEM IN JAVA WITH BLUEJ
RECYCLING SYSTEM IN JAVA WITH BLUEJ  Recycling System The system... is used to identify and collect used beverage containers for recycling or reuse from customers, who in return receive a monetary refund. When you use the system, you
Java Program Qns using BlueJ
Java Program Qns using BlueJ  Write a program that accepts one 3-digit and one 1-digit whole numbers from the command line, and output the working of the division of the 3-digit number (dividend) by the 1-digit number (divisor
Advertisements
writing program in bluej - Java Beginners
Writing bprogram in bluej - Java Beginners
System Time
System Time  how do i store the system time in a variable in BlueJ
Design a class named BankAccount to hold datas for a bank account in Java using Bluej Software - Java Interview Questions
Design a class named BankAccount to hold datas for a bank account in Java using Bluej Software  1)Design a class named BankAccount to hold the following data for a bank account: - Balance - Number of deposits
BlueJ (area of circle)
BlueJ (area of circle)  How does one write a program to calculate the area of a circle in BlueJ? Note that the user will have to provide the radius.   A simple program to calculate the area of a circle. radius provided
Java System class
Java System class  What is the purpose of the System class
what is the java cache system?
what is the java cache system?  To send the webapplication of java cache system
Pos System in Java
Pos System in Java  Where can I learn creating a POS system in java
JAVA SYSTEM LEVEL PROGRAMMING
JAVA SYSTEM LEVEL PROGRAMMING  Hi we all know how to create a file in our system. if we want to create a text file we can do this in this way, RIGHT... the file path immediately after creating a file in our system. After creating the file
mailing system in java - JavaMail
mailing system in java  i want to learn java mailing system can you help me out  Hi manglik, I am sending you a link. I hope that, following link will help you. Please visit for more information: http
Java get System Locale
Java get System Locale   ... are providing you an example which will obtain the locale of the system by using the System.getProperty(). This will provide all the properties of the system
system storage - Java Beginners
system storage  i want to know the systems current storage capacity.(i.e)total space available.total space occupied.total free space like in task manager using java program.can any one provide me a code for it.i need it only
fingerprint identification system on java
fingerprint identification system on java  sir i want full "fingerprint ateendance management" project on java please send me source code i am asking so many members but nobody send answer one of my friend suggest ask question
reservation system - Java Beginners
reservation system  hi help me write a program on a railway reservation system that records the destination of the passengers.It should be decided by the date on which they are to arrive on their destinations and also the number
System
System  What is System in System.out.println() method? Is it a Class or a Package
Grading system - Java Beginners
Grading system  gud day...cn i ask for a javascript of a grading system text box input typed... that calculates quiz and assignment and a prelim + a quiz and assingment and a midterm + a quiz and assingment and a Semifinal
Java project in online examination system
Java project in online examination system  how many and which tables are required at backend as SQL for online examination system project in jsp
Java Hospital management system
Java Hospital management system  hospital management    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <body>
Simple banking system using Java
Simple banking system using Java  I am trying to make a simple banking system that has only 3 interfaces which does not connect to the database... inheritance in java please help.Thank you
railway reservation system - Java Beginners
railway reservation system  help me develop a code on a railway reservation system which maintains records of passengers traveling in the different trains on different dates reaching different destinations in the system
online voting system source code in java
online voting system source code in java  Please send me source code for online voting system in java. please replay as fast as. Thank you
fingerprint attendance system - Java Beginners
fingerprint attendance system  i have project on attendance management system with a fingerprint scanner. i have my own interface but i have no experience how to begin.... please suggest me how to interface connect
i-election voting system project in java
i-election voting system project in java  I want source code and documentation project in java. send
Student Information System in Java - Java Beginners
Student Information System in Java  Hello Sir, I want Mini Java Project for Student Admission System.  Hi Friend, Can you provide us details regarding your project like student admission form, faculty information
Cash Register System - Java Beginners
System for decision making is needed by the management of a newly opening ABC store. You are been given the task to design a system. The system starts when...(System.in); int menu = 0; System.out.println("School Registration System Main Menu
Project on mailing system using Java/JSP
Project on mailing system using Java/JSP  I am making a project on mailing system in Java/JSP. How could I display the inbox messages on the home page of user? Please tell me about how to handle these messages in database
Java Project for College Admission System - Java Beginners
Java Project for College Admission System  I want Project for Student Information System in Java Back end-MS Access plz Give Me source code or website to download it. plz Help Me
dvd rental system - Java Beginners
dvd rental system  i am a young female who just got attracted by the java ptogramming and as i am now learning this, java is geting complecated evey day, now i looking for help with my java project. my project is about keeping
Java example program to get the operating system's version
Java example program to get the operating system's version... check your current system's operating system version by the java code also... simple to know your operating system's version in java. This program displays
how to take system date in java servlet?????
how to take system date in java servlet?????  how to take system date in java servlet?????   Hi Friend, Try the following code:ADS_TO_REPLACE_1 import java.io.*; import javax.servlet.*; import javax.servlet.http.
Payroll and Leave management system in java web application
Payroll and Leave management system in java web application  Hi Can any one help me with leave management and payroll management system sample source...) as per now to me. And also let me know which technology in java for best fit
School Timetable System in java spring mvc 3
School Timetable System in java spring mvc 3  I want to do project in timetable generation for my project. but i dont know how generate. i'm using java spring Hibernate. please some one help me. Thanks thuva
Java get System Properties
Java get System Properties       In this section, you will learn how to obtain the system properties. The System class provides a Properties object that describes
College Student Admission System Project in Java
College Student Admission System Project in Java   Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based
i need attendce management system source code in java
i need attendce management system source code in java  i need attendance management system source code in java
Java example program to get the operating system name of the system
Java example program to get the operating system name of the system       java get Operating...;java GetOSName Operating system name =>Windows 2000 Download
Reverse string in BlueJ
SMS alert system in Java - JSP-Servlet
SMS alert system in Java  Hi, I have asked this questions 2 days before and awaiting answer. But i didn't get any replies so far?? Any experts please help me
SMS alert system using Java - JSP-Servlet
SMS alert system using Java  Respected Sir/Mam, I need to develop an SMS alert application. Scope of the application: Basically... recipients. This can be developed using any kind of componentsThanks
Java Telephone directory management system
Java Telephone directory management system Here we are going to create a java application for Telephone directory system. For this, we have accepted ID, name... System"); System.out.println(); System.out.println("1. Accept Data
Sales System.. Need Help!! - Java Beginners
Sales System.. Need Help!!  were going to make a sales system in our subject Database management and that will be our project, we already have a company to use. But the problem is.. our group dont know how to start, we dont have
Remote System OS name in JAVA - JSP-Servlet
Remote System OS name in JAVA  I need to print the different os names of the all computers in my local network. I know that with System.getProperty("os.name"), I get the os name of my computer but for the other computers, I have
how to get an lan system ip and mac address in java code
how to get an lan system ip and mac address in java code  strong text
Java Project for College Admission System - Java Beginners
Java Project for College Admission System  Hello Sir I urgently wants College Admission Project in Java,with Back End Microsft Access 2007 ,sir plz Give me Full Source Code.  Could u give me the filed should
How to Communicate with the operating system embedded on processor running on hardware machine in java
system embedded on processor running on hardware machine .Now as per my need i have to communicate with the opearating system using java tools. Will you plz...How to Communicate with the operating system embedded on processor running
railway rsrvation system
railway rsrvation system   Java coding for railway reservation system
how to browse the general files which are in system using java? - Java Beginners
how to browse the general files which are in system using java?  how to browse the general files which are in system using java? its just like in ms... java.  Hi friend, For browse and upload the file in jsp and visit
library system
library system  hi to all..please help me how to make a library system using a java program..please response me

Ads