Answer to Question #283663 in C++ for Rasheed

Question #283663

Question 6 (40 marks) 200-500 words per explanation and avoid plagiarism.


I. Explain the following in your own words without copying it from anywhere. Give


examples each in your explanation.


a. Class hierarchies b. Algorithms


c. Flowcharts


d. Control structure

1
Expert's answer
2021-12-30T07:13:36-0500

Class herarcies-The class hierarchy can be as deep as needed. The Instance variables and methods are inherited down through the levels and can be redefined according to the requirement in a subclass. In general, the further down in the hierarchy a class appears, the more specialized its behavior. When a message is sent to an object, it is passed up the inheritance tree starting from the class of the receiving object until a definition is found for the method. This process is called upcasting.

Algorithm-The algorithm library provides several functions that can be used for a variety of purposes, for instance searching, sorting, counting, manipulating and so on. These functions operate on ranges of elements and the range is defined as [first, last).

Algorithm:adjacent_find()-Finds the first occurrence of two consecutive elements that are identical and returns an iterator pointing to the first element if identical element exists consecutively otherwise returns an iterator pointing to the last element.

algorithm::all_of()-Returns true if predicate returns true for all the elements in the range of first to last.

algorithm::any_of() -Returns true if predicate returns true for any of the elements in the range of first to last.

Flowchart-A flowchart is a diagram that depicts a process, system or computer algorithm. They are widely used in multiple fields to document, study, plan, improve and communicate often complex processes in clear, easy-to-understand diagrams. Flowcharts, sometimes spelled as flow charts, use rectangles, ovals, diamonds and potentially numerous other shapes to define the type of step, along with connecting arrows to define flow and sequence. They can range from simple, hand-drawn charts to comprehensive computer-drawn diagrams depicting multiple steps and routes. 

Control Structures-Control Structures are just a way to specify flow of control in programs. Any algorithm or program can be more clear and understood if they use self-contained modules called as logic or control structures. It basically analyzes and chooses in which direction a program flows based on certain parameters or conditions



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog