Ask Question, Ask an Expert


Ask Programming Language Expert

Data Structure and Methods:

• Build an array structure to accomodate at least 10 elements.  Provide routines for  following:
• An initializer.
• A routine to populate (add an element) to the first accessible slot,
• A routine to delete (remove an element) from a selected slot,
• A routine to display the number of the filled slots,
• A routine to show the maximum number of slots,
• A routine to query the contents of a slot,
• A routine to update the information in a slot,
• Test for full and empty conditions of  Array.


prepare (a) program(s) which tests each of the methods employed to manipulate the data structure:

• Construction.
• Populate the accessible slots till the structure is full, then attempt to add one more.
• Query the contents of an all slots.
• Remove the contents of a given slot.
• Update the contents of a slot.
• Deplete the structure till all slots are empty, and then attempt to delete another.

When displaying the full structure use a loop which shows 1 slot and its content, at a time.
Your program must employ a simple menu that repeatedly prompts the user to perform the functions.

ex: Enter an Request Type

1.To add elements in to the Array (till ­1 or null)
2 To remove an element out of the Array
3. To display the contents of the entire Array
4. To query the count of occupied slots
5. To query the maximum number of slots
6. To update an Array slot with a new information value
7. To find the location of a given value
8. Exit

Show all inputs, outputs, explanation of return codes, and informational messages.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91226

Have any Question? 

Related Questions in Programming Language

Create a class named order that performs order processing

Create a class named Order that performs order processing of a single item. The class has the following five fields: Customer name Customer number Quantity ordered Unit price Total price Include set and get methods for e ...

Assignment instructionsexception handlingfirst create three

Assignment Instructions Exception Handling First, create three exception classes named NumberHighException, NumberLowException, and NumberNegativeException. Both NumberHighException and NumberLowException should be direc ...

In this lab you will write a program that simulates the

In this lab you will write a program that simulates the dialing of a phone number. The phone number may have either digits, letters, or both. (See sample output below) Here are the letters associated with each digit. 0 5 ...

1 take into account the number of hours worked if the

1.) take into account the number of hours worked. If the hours is greater than 40, then calculate 1.5 times the rate times the hours over 40. Add the overtime pay to the regular pay, calculated by multiplying rate times ...

Now consider the outer loop of given figure consisting of

Now consider the outer loop of given figure, consisting of blocks B2, B3, B4, and B5. Let g be the transfer function for the loop body, from the entry of the loop at B2 to its exit at B5. Let i measure the number of iter ...

Spreadsheet exercise1 run the spreadsheet program in your

Spreadsheet Exercise 1. Run the spreadsheet program in your computer and type the following:   A B C D E F 1 PAYROLL 2 XYZ COMPANY Employee Name Department Degree Salary Need Increase? 3 Nasser Mechanical Master 15000   ...

Assignmentreference this assignment is an object oriented

Assignment Reference: This assignment is an object oriented version of the In-class assignment. The functionality supported for a single vehicle in ICA 01 would be extended to multiple vehicles using a single class Car, ...

Create a new class called soda that is also a caffeinated

Create a new class called Soda that is also a caffeinated beverage by default it will have no option for condiments. Have it called in main. Main also calls the old addLemon function on Tea so that the customer gets two ...

Assignmentthe csit racing club is a group that runs amateur

Assignment The CSIT Racing Club is a group that runs amateur car racing events throughout the US. In This project, write a program that will help the club determine the winner of their Fall Rally Race. You will need to d ...

Programming assignmentthis question has two parts a and

Programming Assignment This question has two parts (a) and (b): Develop a program to read in five exam-scores (in the range of 0-100) of a student in HIST220 class. (a) You program should compute and store in memory the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen