Question Please use java not C++ Page \( \mathbf{2} \) of Tank is full. The addition is disallowed. Gas Tank Control System 2. Remove From Tank 3. Show Tank 4. EHit Tank Gas Tank Control System Menu. 1. F i L L Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4. Ekit Tank \( x \) Gas Tank Control System Menu. 1. Fill Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System 1 Manul i L L Tank 2. Remove From Tank 3. Show Tank 4. EN it Tank Gas Tank Control System Men!. 1. Fill Tank 2. Remowe From Tank 3. Show Tank 4. Enit Tank is empty. Tank is empty. The removal is disallowed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4 Assume that a local gas station has asked you to create a "Gas Tank Control System" which allows their clerks to manage gas on a tank based on their occupancies. Note: The code submitted must be your own work, otherwise; it won't be graded. You may continue to use the code we did in class to continue your implementation. Submission: Submit your Java file on Blackboard by the due date. Try your best to accomplish the tasks as much as possible. The operations include: 1. Fill Tank 2. Remove From Tank 3. Show Tanks 4. Exit The requirements are as followed. 1. One stack must be constructed. 2. Use character ' \( X \) ' as an item added to the stack. 3. The four operations must be repeated until the "Exit" option is chosen. 4. A unit of gas (X) must be added to the tank. The limitation of the tank is three units. If the tank is full and the clerk tries to add a unit to the gas tank, the system must disallow the addition and display an appropriate message. (See the sample run for the message). 5. To remove, the system must remove a unit from the tank. If the tank is empty and the clerk tries to remove a unit from the gas tank, the system must disallow the removal and display an appropriate message. (See the sample run for the message). 6. The system must allow the clerk to view occupancy of the gas tank at any time. The unit of the gas must be displayed from the bottom of the tank. If any unit of the tank is empty, the system displays a blank instead of ' \( x \) '. Refer to the sample run shown below to see how the tank is displayed.

8ATTMO The Asker · Computer Science

Please use java not C++

Transcribed Image Text: Page \( \mathbf{2} \) of Tank is full. The addition is disallowed. Gas Tank Control System 2. Remove From Tank 3. Show Tank 4. EHit Tank Gas Tank Control System Menu. 1. F i L L Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4. Ekit Tank \( x \) Gas Tank Control System Menu. 1. Fill Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System 1 Manul i L L Tank 2. Remove From Tank 3. Show Tank 4. EN it Tank Gas Tank Control System Men!. 1. Fill Tank 2. Remowe From Tank 3. Show Tank 4. Enit Tank is empty. Tank is empty. The removal is disallowed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4 Assume that a local gas station has asked you to create a "Gas Tank Control System" which allows their clerks to manage gas on a tank based on their occupancies. Note: The code submitted must be your own work, otherwise; it won't be graded. You may continue to use the code we did in class to continue your implementation. Submission: Submit your Java file on Blackboard by the due date. Try your best to accomplish the tasks as much as possible. The operations include: 1. Fill Tank 2. Remove From Tank 3. Show Tanks 4. Exit The requirements are as followed. 1. One stack must be constructed. 2. Use character ' \( X \) ' as an item added to the stack. 3. The four operations must be repeated until the "Exit" option is chosen. 4. A unit of gas (X) must be added to the tank. The limitation of the tank is three units. If the tank is full and the clerk tries to add a unit to the gas tank, the system must disallow the addition and display an appropriate message. (See the sample run for the message). 5. To remove, the system must remove a unit from the tank. If the tank is empty and the clerk tries to remove a unit from the gas tank, the system must disallow the removal and display an appropriate message. (See the sample run for the message). 6. The system must allow the clerk to view occupancy of the gas tank at any time. The unit of the gas must be displayed from the bottom of the tank. If any unit of the tank is empty, the system displays a blank instead of ' \( x \) '. Refer to the sample run shown below to see how the tank is displayed.
More
Transcribed Image Text: Page \( \mathbf{2} \) of Tank is full. The addition is disallowed. Gas Tank Control System 2. Remove From Tank 3. Show Tank 4. EHit Tank Gas Tank Control System Menu. 1. F i L L Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4. Ekit Tank \( x \) Gas Tank Control System Menu. 1. Fill Tank 3. Remowe From Tank 3. Show Tank Eे unit is removed. Gas Tank Control System 1 Manul i L L Tank 2. Remove From Tank 3. Show Tank 4. EN it Tank Gas Tank Control System Men!. 1. Fill Tank 2. Remowe From Tank 3. Show Tank 4. Enit Tank is empty. Tank is empty. The removal is disallowed. Gas Tank Control System Menul i L L Tank 2. Remove From Tank 3. Show Tank 4 Assume that a local gas station has asked you to create a "Gas Tank Control System" which allows their clerks to manage gas on a tank based on their occupancies. Note: The code submitted must be your own work, otherwise; it won't be graded. You may continue to use the code we did in class to continue your implementation. Submission: Submit your Java file on Blackboard by the due date. Try your best to accomplish the tasks as much as possible. The operations include: 1. Fill Tank 2. Remove From Tank 3. Show Tanks 4. Exit The requirements are as followed. 1. One stack must be constructed. 2. Use character ' \( X \) ' as an item added to the stack. 3. The four operations must be repeated until the "Exit" option is chosen. 4. A unit of gas (X) must be added to the tank. The limitation of the tank is three units. If the tank is full and the clerk tries to add a unit to the gas tank, the system must disallow the addition and display an appropriate message. (See the sample run for the message). 5. To remove, the system must remove a unit from the tank. If the tank is empty and the clerk tries to remove a unit from the gas tank, the system must disallow the removal and display an appropriate message. (See the sample run for the message). 6. The system must allow the clerk to view occupancy of the gas tank at any time. The unit of the gas must be displayed from the bottom of the tank. If any unit of the tank is empty, the system displays a blank instead of ' \( x \) '. Refer to the sample run shown below to see how the tank is displayed.
Community Answer
67UKZH

【General guidance】The answer provided below has been developed in a clear step by step manner.Step1/1 #includeusing namespace std;int main(){ cout<>opt; stack tank; //keep repeating the process until the user selects the exit opion while(opt!= ... See the full answer