Java LGV Robot Application: Object-Oriented Command-Based System
VerifiedAdded on 2019/09/16
|8
|1693
|542
Project
AI Summary
This project is a desktop application designed using Java and based on object-oriented programming (OOP) principles. The system simulates an LGV (Laser Guided Vehicle) robot that processes boxes based on temperature input from the user. The application utilizes a command-based interface where users interact via the command prompt. The system involves four main entities: Furnace, Wrapper, LGV, and Park, each represented by a separate class with its attributes and methods. The Furnace produces boxes, the Wrapper wraps them, the LGV robot moves boxes between machines, and the Park stores them. The supervisor class manages the overall flow, controlling the robot's actions based on box temperature. If the temperature is above or equal to 100 degrees, the box goes directly from the furnace to the park; otherwise, it goes to the wrapper first. The system continues processing boxes until the user chooses to stop. The assignment demonstrates object-oriented design, structured programming, and the use of various classes to represent different entities and their interactions. The student learned how to decompose a problem and simplify it through modular design.

Content
Content.......................................................................................................................................1
Introduction................................................................................................................................2
The assignment............................................................................................................................3
The laboratory part..............................................................................................................................................3
The theory part ...................................................................................................................................................3
Learners outcome................................................................................................................................................3
Project explanation......................................................................................................................4
Conclusions.................................................................................................................................7
1
Content.......................................................................................................................................1
Introduction................................................................................................................................2
The assignment............................................................................................................................3
The laboratory part..............................................................................................................................................3
The theory part ...................................................................................................................................................3
Learners outcome................................................................................................................................................3
Project explanation......................................................................................................................4
Conclusions.................................................................................................................................7
1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Introduction
This project is a desktop application. This command based. Use have to first run the “cmd prompt”
and compile and run the java file. To compile user has to type: “javac file_name.java.” To run
project user has to type: “java filename.” This is simple robot command based application. Where
user interact with commands to this project. This project is designed based on Oops technology.
The abbreviation is Object Oriented Programming Technique. According to this technique we
decompose the whole problem into small parts. This is basically done by writing various classes.
Each class belongs to one purpose. This project is also structured. Each process is completed by
only one method at a time.
2
This project is a desktop application. This command based. Use have to first run the “cmd prompt”
and compile and run the java file. To compile user has to type: “javac file_name.java.” To run
project user has to type: “java filename.” This is simple robot command based application. Where
user interact with commands to this project. This project is designed based on Oops technology.
The abbreviation is Object Oriented Programming Technique. According to this technique we
decompose the whole problem into small parts. This is basically done by writing various classes.
Each class belongs to one purpose. This project is also structured. Each process is completed by
only one method at a time.
2

The assignment
I have to design a system that is called LGV. This system take input from the user, this asks from
user he/she wants to produce a box. If the user selects yes then temperature is also asked for the
box. If the box temperature is greater than 100 or equal to 100 C then furnace machine is command
to produce a box with the entered temperature. Now the LGV robot move the box form the Furnace
to Park. If the box temperature is less than 100 C then box is moved to Wrapper machine by LGV
robot. Then Wrapper machine wrap the robot. After this LGV robot start processing and moved it
Park. So each box is moved from the source to destination depending on the box temperature. As a
box is moved to park the system will ask to user is he/she wants to process another box? If user
chooses yes then the above process continues till user doesn’t choose no option.
The laboratory part
I have used java jdk8.0 and windows command prompt.
The theory part
In this system, I have developed an application where the customer can provide input Box to the
furnace and then the whole system runs in the desired way to process the box and move it to the
Park.
The customer gives its input as the temperature of the box. The box is then sent to process by
furnace. Then we call a function "signal()" which is a Boolean function which returns whether the
box is ready to pick up or not. If the box is ready to pick up, then the supervisor checks the
temperature of the box and sets the source and destination of the LGV robot accordingly ( source =
furnace and destination = wrapper for temperature less than 100, and source = furnace, destination =
park otherwise).
Then the supervisor starts the mission of the robot. The robot then goes to the source, picks up the
box and gives it to the destination. It returns true if the destination is Park (which means the box's
journey is over) and returns false if it delivers to the wrapper (which means the box still needs to go
to the park).
The value returned from the robot is analyzed by the supervisor. If it is true then it asks the user if
he wants another box or not. If it returns false, then the supervisor gives another mission to the
robot with source = wrapper and destination = park and after this asks the user if he wants another
box.
In case of delivery to the park, the park checks of it is full or not. If it is full then no other box can
be moved here.
If the user wants another box, then the program continues by asking the temperature if the box and
doing the same process all over again, otherwise the program exits.
3
I have to design a system that is called LGV. This system take input from the user, this asks from
user he/she wants to produce a box. If the user selects yes then temperature is also asked for the
box. If the box temperature is greater than 100 or equal to 100 C then furnace machine is command
to produce a box with the entered temperature. Now the LGV robot move the box form the Furnace
to Park. If the box temperature is less than 100 C then box is moved to Wrapper machine by LGV
robot. Then Wrapper machine wrap the robot. After this LGV robot start processing and moved it
Park. So each box is moved from the source to destination depending on the box temperature. As a
box is moved to park the system will ask to user is he/she wants to process another box? If user
chooses yes then the above process continues till user doesn’t choose no option.
The laboratory part
I have used java jdk8.0 and windows command prompt.
The theory part
In this system, I have developed an application where the customer can provide input Box to the
furnace and then the whole system runs in the desired way to process the box and move it to the
Park.
The customer gives its input as the temperature of the box. The box is then sent to process by
furnace. Then we call a function "signal()" which is a Boolean function which returns whether the
box is ready to pick up or not. If the box is ready to pick up, then the supervisor checks the
temperature of the box and sets the source and destination of the LGV robot accordingly ( source =
furnace and destination = wrapper for temperature less than 100, and source = furnace, destination =
park otherwise).
Then the supervisor starts the mission of the robot. The robot then goes to the source, picks up the
box and gives it to the destination. It returns true if the destination is Park (which means the box's
journey is over) and returns false if it delivers to the wrapper (which means the box still needs to go
to the park).
The value returned from the robot is analyzed by the supervisor. If it is true then it asks the user if
he wants another box or not. If it returns false, then the supervisor gives another mission to the
robot with source = wrapper and destination = park and after this asks the user if he wants another
box.
In case of delivery to the park, the park checks of it is full or not. If it is full then no other box can
be moved here.
If the user wants another box, then the program continues by asking the temperature if the box and
doing the same process all over again, otherwise the program exits.
3
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Learners outcome
I will learn how to program code according object oriented paradigm technology. I will how to
break down the problem into small parts. How can I implement the structured programming also? I
will use different classes to represent different entities and their attributes and the behaviour. I will
implement a driver class where all the entities are combined to perform the project’s main task.
4
I will learn how to program code according object oriented paradigm technology. I will how to
break down the problem into small parts. How can I implement the structured programming also? I
will use different classes to represent different entities and their attributes and the behaviour. I will
implement a driver class where all the entities are combined to perform the project’s main task.
4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Project explanation
There are total four entities which are named as:
Furnace
Wrapper
LFV
Park
The above four entities are designed as four different classes with their attributes.
Classes names and their attributes and methods:
Furnace:
Id:int, this is furnace machine id
Temperature: int, the box temperature
Box_to_pickup: Boolean, if box is produced then it is ready to pick up then the value of this
variable is set to true else this variable value will remain false.
Furnace() constructor: this constructor initiailly set the box_to_pickup variable to false. This
indicates that the box is not produced yet. So the box cannot picked up.
Process(int temp) method: this method produced a box, to produce a box this method set the box
temperature that is temp and set the box_to_pciup to true.
getTemperature(): this method return the temperature of box.
Signal() method: this method returns the box status whether it can be picked or not.
Wrapper Class:
Id: int, this is indetifier of Wrapper machine
Box_in_input:Boolean, it value is false means currently this machine has no box to warp else it has
a box to wrap.
Box_in_outupt: Boolean, if it’s value is true means the box is wrapped successfully else the box is
need to wrapped.
5
There are total four entities which are named as:
Furnace
Wrapper
LFV
Park
The above four entities are designed as four different classes with their attributes.
Classes names and their attributes and methods:
Furnace:
Id:int, this is furnace machine id
Temperature: int, the box temperature
Box_to_pickup: Boolean, if box is produced then it is ready to pick up then the value of this
variable is set to true else this variable value will remain false.
Furnace() constructor: this constructor initiailly set the box_to_pickup variable to false. This
indicates that the box is not produced yet. So the box cannot picked up.
Process(int temp) method: this method produced a box, to produce a box this method set the box
temperature that is temp and set the box_to_pciup to true.
getTemperature(): this method return the temperature of box.
Signal() method: this method returns the box status whether it can be picked or not.
Wrapper Class:
Id: int, this is indetifier of Wrapper machine
Box_in_input:Boolean, it value is false means currently this machine has no box to warp else it has
a box to wrap.
Box_in_outupt: Boolean, if it’s value is true means the box is wrapped successfully else the box is
need to wrapped.
5

receiveBox() method: this method print a message: “Box has successfully sent to wrapper.
And set the box_in_input variable value to true and call processBox() method.
processBox(): this method set the box_in_output variable to true means box is successfully
wrapped and print a message: “Box has successfully wrapped and ready to pickup. Sending signal
to supervisor.
Signal() method: this method return the value of box_in_output value.
If value of this variable is false, it’s meaning is that box is wrapped else box is not wrapped yet.
Park Class:
Id:int, this represent the id of park.
MAX_CAPACITY: final int, this is constants, it represent that A park has space for maximum
number of boxes.
numBoxes: int, this variables keeps the counting of boxes which are moved by the user into park.
receiveBox() method: Every time a box is moved to park this variable is compare with the
MAX_CAPACITY variable. If numBoxes is greater than park capacity then current operation is
aborted and a message is printed to user. If numBoxes is less than the MAX_CAPACITY then a
success message is printed.
LGV Class:
Source:int, every machine has their own identity number. So those machines are treated as source
and destination for this LGV robot. This variable represents the source of box for the robot.
Destination: int, this represents the destination of box for the robot.
setSource(int src) method: this method sets the source value
setDestination(int dest) method: this method sets the destination value
startMission(Wrapper wrapper, Park park) method: this methods sets the functioning for the robot.
If soruce value is equal to 1
Then print: “ LGV robot picking box from the furnace”
Else if source equal to 2
Then print: “ LGV robot picking box from the wrapper”
If destination is equal to 2 then
6
And set the box_in_input variable value to true and call processBox() method.
processBox(): this method set the box_in_output variable to true means box is successfully
wrapped and print a message: “Box has successfully wrapped and ready to pickup. Sending signal
to supervisor.
Signal() method: this method return the value of box_in_output value.
If value of this variable is false, it’s meaning is that box is wrapped else box is not wrapped yet.
Park Class:
Id:int, this represent the id of park.
MAX_CAPACITY: final int, this is constants, it represent that A park has space for maximum
number of boxes.
numBoxes: int, this variables keeps the counting of boxes which are moved by the user into park.
receiveBox() method: Every time a box is moved to park this variable is compare with the
MAX_CAPACITY variable. If numBoxes is greater than park capacity then current operation is
aborted and a message is printed to user. If numBoxes is less than the MAX_CAPACITY then a
success message is printed.
LGV Class:
Source:int, every machine has their own identity number. So those machines are treated as source
and destination for this LGV robot. This variable represents the source of box for the robot.
Destination: int, this represents the destination of box for the robot.
setSource(int src) method: this method sets the source value
setDestination(int dest) method: this method sets the destination value
startMission(Wrapper wrapper, Park park) method: this methods sets the functioning for the robot.
If soruce value is equal to 1
Then print: “ LGV robot picking box from the furnace”
Else if source equal to 2
Then print: “ LGV robot picking box from the wrapper”
If destination is equal to 2 then
6
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Wrap the box call the wrapper. receiveBox(); and return the false
Else if destination is equal to 3 then
Move the box to park by calling park.receiveBox() method and return true.
Else return false.
If return value is true: it means the box is moved to its final destination that is park.
If return value is false: it means the box is wrapped only still box needs to move into park.
Supervisor Class: This class has the main method and handles all the machines functioning and
robot functioning.
7
Else if destination is equal to 3 then
Move the box to park by calling park.receiveBox() method and return true.
Else return false.
If return value is true: it means the box is moved to its final destination that is park.
If return value is false: it means the box is wrapped only still box needs to move into park.
Supervisor Class: This class has the main method and handles all the machines functioning and
robot functioning.
7
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Conclusions
I have faced some problems to recognize what will the exactly methods in all classes. Second
problem how to deal with the source and destination problem. Third where to print all messages to
display to user either I have to return messages and print into main class or print into same class. I
simple named the methods according to their work for each entity. The all ids I have used to
identify what is current source or destination of a box. I prefer to print the message in same class
where they were generated. The user of Boolean data type is very useful for me. It make more
convenient to implement the functionalities. There are two variables in LGV class which are as
private Boolean atSource,private Boolean atDestination,these variables, I do not found as useful
as others. I have learnt that how a problem can be decomposed and simplified by using various
classes, objects and small modules. After working on this project, I have the proper knowledge of
data types, entities, objects and methods. This knowledge will help me to simply and design
complicated projects in just simple modules.
8
I have faced some problems to recognize what will the exactly methods in all classes. Second
problem how to deal with the source and destination problem. Third where to print all messages to
display to user either I have to return messages and print into main class or print into same class. I
simple named the methods according to their work for each entity. The all ids I have used to
identify what is current source or destination of a box. I prefer to print the message in same class
where they were generated. The user of Boolean data type is very useful for me. It make more
convenient to implement the functionalities. There are two variables in LGV class which are as
private Boolean atSource,private Boolean atDestination,these variables, I do not found as useful
as others. I have learnt that how a problem can be decomposed and simplified by using various
classes, objects and small modules. After working on this project, I have the proper knowledge of
data types, entities, objects and methods. This knowledge will help me to simply and design
complicated projects in just simple modules.
8
1 out of 8
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.
