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 BLUEJRECYCLING 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 BlueJJava 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
System TimeSystem Time how do i store the
system time in a variable in
BlueJ 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 LEVEL PROGRAMMINGJAVA 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 - JavaMailmailing
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 Beginnerssystem 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 javafingerprint 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 Beginnersreservation 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
SystemSystem What is
System in System.out.println() method? Is it a Class or a Package
Grading system - Java BeginnersGrading 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 Hospital management systemJava Hospital management system hospital management
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<body>
Simple banking system using JavaSimple 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 Beginnersrailway 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 fingerprint attendance system - Java Beginnersfingerprint 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
Student Information System in Java - Java BeginnersStudent 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/JSPProject 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
dvd rental system - Java Beginnersdvd 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
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.
School Timetable System in java spring mvc 3School 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
SMS alert system in Java - JSP-ServletSMS 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-ServletSMS 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 systemJava 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 BeginnersSales
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-ServletRemote
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
library systemlibrary system hi to all..please help me how to make a library
system using a
java program..please response me