Question
XYZ is a manufacturer of trucks. It has a manufacturing plant in location ABC. Every day it receives a delivery of goods required for manufacturing
XYZ is a manufacturer of trucks. It has a manufacturing plant in location ABC. Every day it receives a delivery of goods required for manufacturing of the truck. The delivered goods are stored in a temporary storage location called as goods receipt area where they are each allotted a storage unit number. The goods are then transferred from the goods receipt area to the storage unit. The storage unit number is made up of a combination of warehouse number, warehouse zone and storage bin number. The first 3 characters represent the warehouse number, the next 3 characters represent the warehouse zone and the last 8 characters represent the storage bin. The storage bin is also called as coordinate because it is derived from the coordinate system.
The coordinate 02-03-02 will refer to the storage bin in 2 row, 3 column and 2 level.
Write a GO program which scans the storage unit number and outputs only the storage bin coordinate for the forklift operator to move the goods from the goods receipt area to the storage unit.
-
slice() is used to extract a part of the string based on the start and end index specified.
-
split() is used to split the string into an array of substrings.
-
includes() is used to determine if an array/string contains a particular
element/characters.
-
main() function I/O implementation; get input file and redirect buffered output to
output.txt file
Submission: Simply submit your main.go file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started