Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A4E3 (3 points-C++Program 2 The purpose of this exercise is to familiarize you with default function arguments. Exclude any existing 3 source code files that

image text in transcribed
A4E3 (3 points-C++Program 2 The purpose of this exercise is to familiarize you with default function arguments. Exclude any existing 3 source code files that may already be in your IDE project and add two new ones, naming them C1A4E3.Printlines.cpp and C1A4E3-main.cpp. Do not use #include to include either of these files in each other or in any other file. However, you may use it to include any appropriate header file(s) you need Re quired Procedure- Exercise 2 Must Be Correct First Copy the entire contents of files CIA4E2 PrintlLines-3.cpp and CIA4E2 main.cpp from Exercise 2 a. Change any comment(s) affected by the exercise number and file name changes. a. Change any comment(s) affected by the exercise number and file name changes: c. Modify the prototype for the 3-parameter version of Printlines so the entire 3. If you make any changes other than those described above you are doing this exercise into files C1A4E3_ PrintLines.cpp and CIA4E3 main.cpp, respectively. of this exercise and then 1. In file C1A4E3 PrintLines.cpp do only the following 2. In file C1A4E3 main.cpp do only the following b. Delete the prototypes for the 0, 1. and 2-parameter versions of Printlines program will produce identically the same results as Exercise 2 incorrectly Test your program the same way as in Exercise 2. Submitting your solution Send your two source code files to the Assignment Checker with the subject line CIA4E3 ID, where ID is your 9-character UCSD student ID See the course document titled "Preparing and Submitting Your Assignments" for additional exercise formatting, submission, and Assignment Checker requirements Hints: 1. Default function arguments are illustrated in note 5.7. See the bottom of note 5.8 for an illustration of converting two overloaded functions into a single default argument function. Standard good practice dictates that you not put default argument values in the declaration part of a function definition except in very rare cases, which this exercise is not. Default argument values are used only if actual arguments are not provided If you're having trouble determining the default argument values consider required behavior of the Printlines functions having less than three parameters in the previous exercise. What values are they using in place of those omitted parameters? 2

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

1 Why is job analysis important?

Answered: 1 week ago