I need help with these two questions please.
I need help with these two questions please.
C++ Programming #1. Instructions Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder’s name (string), account number (int), account type (string, checking/saving), balance (double), and interest rate (double). (Store interest rate as a decimal number.) Add appropriate member functions to manipulate an object. Use a static member in the class to automatically assign account numbers. Also, declare an array of 10 components of type bankAccount to process up to 10 customers and write a program to illustrate how to use your class. Example output is shown below: 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customers data. 9: Enter 9 to exit the program. 1 Enter customer’s name: Dave Brown Enter account type (checking/savings): checking Enter amount to be deposited to open account: 10000 Enter interest rate (as a percent): .01 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customers data. 9: Enter 9 to exit the program. 3 Account Holder Name: Dave Brown Account Type: checking Account Number: 1100 Balance: $10000.00 Interest Rate: 0.01% ***************************** 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customers data. 9: Enter 9 to exit the program. Since your program handles currency, make sure to use a data type that can store decimals with a precision to 2 decimals. #2. Instructions Write the definitions of the member functions of the class integerManipulation not given in Example 10-11. Also, add the following operations to this class: Split the number into blocks of n-digit numbers starting from right to left and find the sum of these n-digit numbers. (Note that the last block may not have n digits. If needed add additional instance variables.) Determine the number of zeroes. Determine the number of even digits. Determine the number of odd digits Also, write a program to test theclass integerManipulation. The header file for class integerManipulation has been provided for you. C++ Programming: Program Design Including Data Structures, 8e Example 10-11 class integerManipulation { public: void setNum(long long n); //Function to set num. //Postcondition: num = n; long long getNum(); //Function to return num. //Postcondition: The value of num is returned. void reverseNum(); //Function to reverse the digits of num. //Postcondition: revNum is set to num with digits in // in the reverse order. void classifyDigits(); //Function to count the even, odd, and zero digits of num. //Postcondition: evenCount = the number of even digits in num. // oddCount = the number of odd digits in num. int getEvensCount(); //Function to return the number of even digits in num. //Postcondition: The value of evensCount is returned. int getOddsCount(); //Function to return the number of odd digits in num. //Postcondition: The value of oddscount is returned. int getZerosCount(); //Function to return the number of zeros in num. //Postcondition: The value of zerosCount is returned. int sumDigits(); //Function to return the sum of the digits of num. //Postcondition: The sum of the digits is returned. integerManipulation(long long n = 0); //Constructor with a default parameter. //The instance variable num is set accordingto the parameter, //and other instance variables are set to zero. //The default value of num is 0; //Postcondition: num = n; revNum = 0; evenscount = 0; // oddsCount = 0; zerosCount = 0; private: long long num; long long revNum; int evensCount; int oddsCount; int zerosCount; };




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.