Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ Assuming that ensureLower has code that works, what statements are true given the following diagram. Select one or more: a. The constructor might

image text in transcribedimage text in transcribedin c++

Assuming that ensureLower has code that works, what statements are true given the following diagram. Select one or more: a. The constructor might look like: \begin{tabular}{|rl|} \hline 7 & Account (float bal, std: :string un) \{ \\ 8 & this->balance = bal; \\ 9 & this->username = ensureLower ( un ); \\ 10 & \} \end{tabular} class. c. The getUsername method in the following code returns something, which cannot be used to change the private field 'username': \begin{tabular}{|ll} \hline 20 & virtual std::string getUsername() \{ \\ 21 & return username; \\ 22 & \} \end{tabular} d. The ensureLower method must be public. e. The constructor might look like: g. The setter for username might look like: \begin{tabular}{|ll|} \hline 24 & virtual void setUsername(std::string un) \\ 25 & this->username = setUsername (un); \\ 26 & \} \end{tabular}

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions