do the following: - A or a to add a container. - D or d to delete a container. - R or r to retrieve the information of one container. - T or t to retrieve the

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a program in C that stores the information of up to 25 containers loaded on ship.
Ask the user for the number of containers to be loaded. If the user enters a number of containers
greater than 25 or less than 3, then re-prompt for the container number until an acceptable number is
entered.
Create an array of floats with six rows and a number of columns equal to the number of containers
provided by the user
Display a menu to do the following:
- A or a to add a container.
- D or d to delete a container.
- R or r to retrieve the information of one container.
- T or t to retrieve the information of all containers.
- W or w to retrieve the total weight of the loaded containers.
- C or c to retrieve the total cubic volume of the containers loaded on the ship (array).
- V or v to retrieve the total value of the containers loaded on the ship.
- X or x to exit the program
Option A: for this option check if the array has an empty column to enter the information for a
container, if not, output a message indicating that array is full. If array is not full, ask the user for the ID
number, length in meters, width in meter, height in meters, weight in Kg, and value in dollars of the
container and store them in the first available column in the array.
Option D: Ask the user for the ID of the container to be deleted. If the ID exist in the array then set all
the values in the corresponding column to zero. If the ID does not exist in the array, output an
appropriate msg.
Option R: Ask the user for the desired ID number to be searched. If found, output the ID number, length
in meters, width in meter, height in meters, weight in Kg, and volume in cubic meters of the container
each on a line. If not found, display a message to that effect.
Container ID: 1234
Length: 6.50 meters
Width: 3.65 meters
Hight: 4.00 meters
Weight: 3282.58 Kg
Volume: 94.90 meters cube

 
 
 
 
 
 
 
Option T: retrieve the info for all containers in the array with a dotted line separating one another. The
info retrieved and calculated should be the same as the above step.
Option W: display the total weight of all the containers in the array.
Option C: display the total volume of all the containers in the array.
Option V: display the total value of all the containers in the array.
Option X: Exit the program
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education