How you might achieve the effect of a generic abstract type

Assignment Help C/C++ Programming
Reference no: EM131864432

Problem

C does not support data abstraction or generic abstraction. Nevertheless, it is possible to build a library of C program units that achieves some of the benefits of data abstraction and generic abstraction.

(a) Show how you would write a C program unit that achieves the effect of an abstract type. The program unit should provide a named type (such as Date), together with some operations on that type, without revealing how that type is defined.

(b) Now suggest how you might achieve the effect of a generic abstract type. You must enable a program unit that implements a generic abstract type (such as List) to be instantiated as required. Application programmers should be able to link these program units to their programs. What software management tools would be needed, in addition to the C compiler?

Reference no: EM131864432

Questions Cloud

Aggregate level of research in deterrence studies : Considering the aggregate level of research in deterrence studies, do you find these studies valid? Explain why or why not.
Explain why hyperthermophile is unlikely to human pathogen : Explain why hyperthermophile is unlikely to be human pathogen and explain why and how refrigerator, freezing, and curing a meat in salt
Discuss similarities in models of clinical supervision : Describe the differences and similarities among the 3 models of clinical supervision, the Developmental model,Integrated model, and Orientation specific model.
Most important methods that police managers : What do you believe are the most important methods that police managers should use to influence officer attitudes, overcome resistance, and implement change?
How you might achieve the effect of a generic abstract type : Show how you would write a C program unit that achieves the effect of an abstract type. Now suggest how you might achieve the effect of a generic abstract type.
Fully discuss the classical school of criminology : Fully discuss the classical school of criminology. Include the following points: the major contributors, the assumptions about society, crime, and punishment
Write a case scenario in which a business inspection : Write a case scenario in which a business inspection would be legal and describe circumstances in which that inspection would become illegal.
Define competitive advantage in terms of quality and price : Describe the Nike company's competitive advantage in terms of quality, price, selection, location, and service. Include here a set of POPs.
Could discipline enforced by suitable software management : how disciplined use of #include directives can mitigate worst danger of independent compilation. Could discipline enforced by suitable software management tool.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a method insertat that takes four parameters

Write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say insertItem; and an interger, say, index.

  Payroll and uses the selection construct

This problem involves payroll and uses the selection construct. A possible restatement: An hourly employee's regular payRate is $16.78/hour for hoursWorked

  Write a program that declares three one dimensional

Write a program that declares three one dimensional arrays named miles, gallons, and mpg . Each array should be declared in main( ) and should be capable of holding ten double

  Write code to add the menu item m item to the menu m

Suppose you are defining a class called Menu GUI that is a derived class of the class J Frame. Write code to add the menu item m Item to the menu m.

  Implementation of matrix multiplication

Show the matrix product and implementation of matrix multiplication. Please show me all the working and provide the answer.

  Sockets for this problem you will implement a client-server

sockets for this problem you will implement a client-server version of the rock-paper-scissors-lizard-spock game which

  Create a cpp program to manage the list of enrolled students

In this homework, you will create a C++ program to manage the list of enrolled students in a university.

  Write a function that compares at most n bytes

Write the following function that compares at most n bytes beginning with s2 with the cor- responding bytes beginning with s1, where n is the number of bytes that s2 has to be incremented before it points to the null character \0.

  What are generic classes in c++

What are generic classes

  Write a program to implement a simple batch operating system

Write a program C/C++ to implement a simple batch operating system. Develop a simple loader, scheduler, memory manager, and shell.

  Write a program that performs character processing

Write a program that performs character processing on 10 characters read in from a file, and writes the results to output files. Do NOT use loops or arrays to solve this problem.

  1 nbspwrite a c program to accept distance in kilometers

1. nbspwrite a c program to accept distance in kilometers coverts it to meters and then displays the result.2.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd