Starting Out With C++: Early Objects, Student Value Edition (9th Edition)
9th Edition
ISBN: 9780134379319
Author: Tony Gaddis, Judy Walters, Godfrey Muganda
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 12, Problem 30RQE
Soft Skills
30. You are a member of a standardization committee for a new C++ standard, and there is a proposal on the table to drop C-strings from the language and support only the C++ string class. State whether you would oppose or support the proposal and explain why.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
In C language. Please don't copy similar programs from, bartleby or chegg
Define a structure type auto_t to represent an automobile.
Include components for the make and model (strings), the odometer reading, the manufacture and purchase dates (use another user-defined type called date_t), and the gas tank (use a user-defined type tank_t with components for tank capacity and current fuel level, giving both in gallons).
Write I/O functions scan_date, scan_tank, scan_auto, print_date, print_tank, and print_auto,
and also write a driver function that repeatedly fills and displays an auto structure variable until input is -30. Note: Each record has a number (1, 2, 3 ...),once the program scans record number -30, it should terminate without processing it.
SAMPLE RUN #4: ./Structures Interactive Session Show Invisibles Highlight:
Enter record number:1
Enter Make:Mercury
Enter Model:Sable
Enter Odometer Reading:99842
Enter Month:1 Enter Day:18
Enter Year:2001
Enter Month:5
Enter Day:30…
What is the output of the following C++ code?
#include <iostream>
using namespace std;
class Base
{
public:
Base ( )
{
cout << "1" << endl;
}
~Base ( )
{
cout << "2" << endl;
}
};
class Derived : public Base
{
public:
Derived ( )
{
cout << "3" << endl;
}
~Derived ( )
{
cout << "4" << endl;
}
};
int main( )
{
Derived x;
}
Implement in C Programming
7.9.1: LAB: BankAccount struct
Given main(), build a struct called BankAccount that manages checking and savings accounts. The struct has three data members: a customer name (string), the customer's savings account balance (double), and the customer's checking account balance (double). Assume customer name has a maximum length of 20.
Implement the BankAccount struct and related function declarations in BankAccount.h, and implement the related function definitions in BankAccount.c as listed below:
BankAccount InitBankAccount(char* newName, double amt1, double amt2) - set the customer name to parameter newName, set the checking account balance to parameter amt1 and set the savings account balance to parameter amt2. (amt stands for amount)
BankAccount SetName(char* newName, BankAccount account) - set the customer name
void GetName(char* customerName, BankAccount account) - return the customer name in customerName
BankAccount SetChecking(double amt, BankAccount…
Chapter 12 Solutions
Starting Out With C++: Early Objects, Student Value Edition (9th Edition)
Ch. 12.2 - Write a short description of each of the following...Ch. 12.2 - What will the following program segment display?...Ch. 12.2 - Prob. 12.3CPCh. 12.2 - Prob. 12.4CPCh. 12.2 - Write code that uses the cin.get1ine function read...Ch. 12.2 - Indicate whether the following strcmp function...Ch. 12.2 - Prob. 12.7CPCh. 12.3 - Write a short description of each of the following...Ch. 12.3 - Write a statement that will convert the C-string...Ch. 12.3 - Prob. 12.10CP
Ch. 12.3 - Prob. 12.11CPCh. 12.3 - Prob. 12.12CPCh. 12.4 - What is the output of the following program?...Ch. 12 - A(n)___________is represented in memory as an...Ch. 12 - The____________ statement is required before the...Ch. 12 - A(n)____________is written in your program as a...Ch. 12 - Prob. 4RQECh. 12 - The______________ is used to mark the end of a...Ch. 12 - Prob. 6RQECh. 12 - Prob. 7RQECh. 12 - Prob. 8RQECh. 12 - Prob. 9RQECh. 12 - Prob. 10RQECh. 12 - Prob. 11RQECh. 12 - Prob. 12RQECh. 12 - Prob. 13RQECh. 12 - Prob. 14RQECh. 12 - Prob. 15RQECh. 12 - Prob. 16RQECh. 12 - Prob. 17RQECh. 12 - Prob. 18RQECh. 12 - Write a function whose prototype is char...Ch. 12 - #inc1ude iostream using namespace std; int main()...Ch. 12 - #include iostream using namespace std; int main()...Ch. 12 - #include iostream using namespace std; int main()...Ch. 12 - #inc1ude iostream #inc1ude string using namespace...Ch. 12 - #inc1ude iostream #inc1ude cstring using namespace...Ch. 12 - #inc1ude iostream using namespace std; int main()...Ch. 12 - #inc1ude iostream #inc1ude string using namespace...Ch. 12 - #include iostream #inc1ude cstring using namespace...Ch. 12 - #include iostre4m #inc1ude cstring using namespace...Ch. 12 - Each of the following programs or program segments...Ch. 12 - Soft Skills 30. You are a member of a...Ch. 12 - Prob. 1PCCh. 12 - Prob. 2PCCh. 12 - Prob. 3PCCh. 12 - Prob. 4PCCh. 12 - Name Arranger Write a program that asks for the...Ch. 12 - Prob. 6PCCh. 12 - Prob. 7PCCh. 12 - Prob. 8PCCh. 12 - Prob. 9PCCh. 12 - Password Verifier Imagine you are developing a...Ch. 12 - Prob. 11PCCh. 12 - Check Writer Write a program that displays a...Ch. 12 - Prob. 13PCCh. 12 - Dollar Amount Formatter Modify Program 12-13 by...Ch. 12 - Word Separator Write a program that accepts as...Ch. 12 - Prob. 16PCCh. 12 - I before e except after c A friend of yours who is...Ch. 12 - User Name Write a program that queries its...Ch. 12 - String Splitter Write a function vectorstring...Ch. 12 - Palindromic Numbers A palindromic number is a...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
The process of opening a file is only necessary with input files. Output files are automatically opened when da...
Starting Out with Programming Logic and Design (4th Edition)
Words that have predefined meaning in a programming language are called _____ .
Starting Out With Visual Basic (7th Edition)
What is an accessor method? What is a mutator method?
Java: An Introduction to Problem Solving and Programming (7th Edition)
When you pass an object that is an instance of a class as an argument, what is passed into the parameter variab...
Starting out with Visual C# (4th Edition)
Further modify the C++ program that you already modified in Practice Program 2. Change the multiplication sign ...
Problem Solving with C++ (10th Edition)
Sales Tax Write a program that will ask the user to enter the amount of a purchase. The program should then com...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- NOTES : In C Language Use basic code, dont use return, void, ect. Dont Use Stdlib.h library, use basic code Pay attention to constraintsarrow_forwardQ5: Write a C++ program that uses a structure to store records of cars. A car record contains seating_capacity (integer), model_year (string), car_type(String), and Engine_type as Eng. (Engine). The field Engine_type is of type Engine, a separately declared structure that contains three fields Capacity(int) in CC, Power (int) in horsepower, and No_of_cylenters(int). Now in main function you are required to declare a car C1, take input from user, for car_type, model_year, and car_type, Capicity, and show it as an output.Sample Input:Please enter car_type C1: Toyota SedanPlease enter model year for Toyota Sedan: 2020Please enter capacity for Toyota Sedan 2020: 1300Please enter power for Toyota Sedan: 200Sample Output:Toyota Sedan model 2020 is 1300 cc with 150 horsepowerarrow_forwardCreate a function called reverse() that has a string parameter. The function reverses the characters of the string locally. ( in C language)arrow_forward
- 7.9 Lab 7: C Strings We have been studying C string functions, and in class we reviewed these: strlen, strcpy, strncpy, strchr,strrchr, strstr, strcmp, strcat This week you will write your own version of some of these string functions. **Important: You cannot use the built in string functions. You must implement each stage described below in a separate function and not in main()** Specifically you will write one function each for the below stages. Running the program would look like: Enter a word: cat That word has length: 3 cat without vowels is: ct Enter how many duplicates to make: 3 ctctct Stage 1: Write the myStrlen() function so that it returns the length of the any given string Stage 2: Write a function removeVowels() such that it removes all the vowels in the word entered by the user and returns a vowel-less word. Stage 3: Write a function duplicateString() such that it duplicates the string of vowel-less words some number of times. C++ pleasearrow_forward7.9 Lab 7: C Strings We have been studying C string functions, and in class we reviewed these: strlen, strcpy, strncpy, strchr,strrchr, strstr, strcmp, strcat This week you will write your own version of some of these string functions. **Important: You cannot use the built in string functions. You must implement each stage described below in a separate function and not in main()** Specifically you will write one function each for the below stages. Running the program would look like: Enter a word: cat That word has length: 3 cat without vowels is: ct Enter how many duplicates to make: 3 ctctct Stage 1: Write the myStrlen() function so that it returns the length of the any given string Stage 2: Write a function removeVowels() such that it removes all the vowels in the word entered by the user and returns a vowel-less word. Stage 3: Write a function duplicateString() such that it duplicates the string of vowel-less words some number of times.arrow_forwardHELP WITH C+...PASTE INDENTED CODE Given the code: class Organization {private; int numMembers; // number of members in the organization string *name; // name of the organization string *members; // dynamic array of members}1. Write a function definition for a Constructor to initialize all data members.2. Write a function definition for the Copy Constructor.3. Write a function definition for the Destructor.arrow_forward
- write a program in c++ that contains declares a student_t data structure and defines functions to: * string name // the name of the student * int class // 1,2,3,4 * char group // a,b,c,d,.... * string subject // e.g. computer programming 3 * marks_t notes // the notes of this subjectarrow_forwardWrite in F# language (F sharp) -> do not use Python, C++, C#, C, Java, etc… The following: In F# write an expression evaluation function that take as arguments a list of variable bindings and a string that is composed of letters and operators from the set [+ - * /$@]. It will scan the string from left to right, interpreting the string as an expression in postfix notation (except for the $ and @ special characters). * When it encounters a letter, it should retrieve the value associated with that letter and push it on an operand stack. * When it encounters an arithmetic operator, it should pop two operands off of the stack, do the computation indicated by the operation, and then push the result onto the stack. * When it encounters a $, it should should be interpreted as a swap operation, which pops two operands off of the stack, and pushes them back on in reverse order. * When the function encounters @, it should read the next character, which will be a letter, then pop the top…arrow_forwardNeed help with C++ Question. The question is attatched as a image, and the code is copied below: #include <iostream> 2 using namespace std; 3 4 class Student { 5 public: 6 friend Student OutputDuplicate (Student obj); // friend function 7 8 Student (); // Default constructor 9 10 Student (string n); // String constructor 11 12 Student (const Student & obj); // Copy constructor 13 14 Student& operator= (const Student & right); // Assignment operator 15 16 ~Student() ; // Destructor 17 18 private: 19 string name; 20 21 }; 22 23 // Default constructor 24 Student::Student() : name("no name") 25 { 26 // Intentionally left blank 27 } 28 29 // String constructor 30 Student::Student(string n) : name(n) 31 { 32 // Intentionally left blank 33 } 34 35 // Copy constructor 36 Student::Student(const Student &…arrow_forward
- Question 1: break phrase Problem statement Breaking a string into two parts based on a delimiter has applications. For example, given an email address, breaking it based on the delimiter "@" gives you the two parts, the mail server's domain name and email username. Another example would be separating a phone number into the area code and the rest. Given a phrase of string and a delimiter string (shorter than the phrase but may be longer than length 1), write a C++ function named break_string to break the phrase into two parts and return the parts as a C++ std::pair object (left part goes to the "first" and right part goes to the "second"). Do the following Write your algorithm as code comments. I recommend to follow UMPIRE technique Implement your functionarrow_forwardPlease write in C++ using the code template below and edit it according to the part2 question and add comments explaining your code, thank you. Template: #include <iostream>using namespace std; void printSquare(int);void printDifferentElements(int[],int[],int); int main(){ return 0;} void printDifferentElements(int a[], int b[], int size) { // *** FILL THIS FUNCTION FOR PART 2 *** }arrow_forwardAssume the following structure declaration exists struct Rectangle{int length;int width;}; Now write a program in c++ that describe the definition of a pointer to a Rectangle structure ( Drop screenshot of output as well )arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
What Are Data Types?; Author: Jabrils;https://www.youtube.com/watch?v=A37-3lflh8I;License: Standard YouTube License, CC-BY
Data Types; Author: CS50;https://www.youtube.com/watch?v=Fc9htmvVZ9U;License: Standard Youtube License