Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Questions Part 4(End) Thank you for all your help. 26) Could you use the maximum finding function object you designed in #22 to help

C++ Questions Part 4(End)

Thank you for all your help.

image text in transcribedimage text in transcribedimage text in transcribed

26) Could you use the maximum finding function object you designed in #22 to help with processing the scores from 25? If so, how? If not, why not? 27) When a data file has a block structure such that each block has information about a particular item (e.g. a bank patron, a self-sealing stem-bolt, an inventory item, a sample taken at a geological dig, etc.), the file's data would be most effectively read by a loop: A) in the main program with each block going into parallel spots in many containers B) in the main program with each block going into a class-type variable, processing it before moving on to the next block C) in a class method with each block going into parallel member containers D) in a class method with each block going into member variables to be processed before reading the next block E) in the main program with each block going into an element of a class-type based container for later processing 28) How would you allow the user to place comments in a data file? Explain briefly. 29) Recalling that ' y can be rewritten as x.operator(y (when x is an object of a class for which operator+ has been overloaded as a member function taking an argument of y's type), rewrite each of the following expressions as operator function calls. Use non-member operator versions only when necessary. Assume all variables are objects with appropri- ate overloading available. Assume all class operations return a class object- where reasonable. (And, yes, all of these operators exist and are overload-able.) x=y*2 n q &S o(42, t-u, rh) 42. t-u 30) Write a two-line function to determine and return the length of a caller-specified input stream (measured in bytes). (Thought-provoker: The line count would be five if you cleaned up after yourself) (Thought-provoker: What should the return-type of your function be?)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions