Question: How is the null character represented in C++? Identify and describe two common errors that are easy to make when manipulating arrays. What are the

How is the null character represented in C++?

Identify and describe two common errors that are easy to make when manipulating arrays.

What are the disadvantages of using global variables instead of local variables?

Create a class called "Savings". This class has three attributes, all private,

  1. string alias
  2. double interest
    1. both of the above are created upon instancing
  3. double balance, starts at 0.00

The methods are

  1. a constructor
  2. a privatecalcInterest()
    1. adds to the current balance the product of the balance * interest
    2. replaces balance
  3. a public alias(string) function
    1. changes the alias to a new string passed as a parameter
    2. does not allow empty string
  4. a publicdeposit(double) function
    1. passes an argument which adds to the current balance
    2. then calls calcInterest()
  5. a public display() function
    1. displays info describing the object

The main() should have:

Savings savings("college", 0.05);

savings .alias("car");

savings .deposit(5000);

savings.display();

This should produce the output:

The savings called car has $5250.0

____________________ are variables that can hold memory addresses.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!