Demonstrate your programming abilities in cpp

Assignment Help C/C++ Programming
Reference no: EM131964803

Lab Assignment

Use the vector class to implement the addition a list of 26 huge integers. Also, you can implement the multiplication of the first two of these huge integers.

Purpose: Using the dynamic C++ templated vector class, write a program to add integers of any size. Your program will use methods in the standard C++ vector class to solve this problem. The input file will be read in as a string. Each string will be parsed and processed to store each digit into a vector. For example "1234567" will be processed into a vector object as [7, 6, 5, 4, 3, 2, 1, 0, 0, 0]. Notice this is backwards from its original number. However, this allows you to easily add digit by digit (left to right) into another vector object (also left to right) containing the accumulated sum. Note: this lab will replace your lowest lab score, and thus it will elevate your overall lab average score (40% of your final grade). It will not lower your overall lab score.

Problem:

1. Demonstrate your programming abilities in C++ by adding a given list of the first 26 very large integers (given in this specification sheet). You must use these data as input for your program.

2. The LargeTester.cpp will contain a "clean" main function and other functions you have designed to solve this problem.

3. After reading all the data in the file, close it and print your sum to the console and the output file.

4. For 10 points extra credit, your output skips 2 lines and re-displays the first two large integers, again. The next line should indicate the product of these two large integers. Send these 1st two large integers and product to both the console and to the output file.

5. There is a total of 26 large integers in the input file. You must use only this given input file.

6. To simplify the work in this last week, it is not necessary to format your large integers by right justifying them. Simply left justify all displayed outputs (in normal forward order).

7. When coding this lab project use copious comments to explain your solution. Document at least 50% of your code with comments. In other words if the class is 200 lines in length, document at least 100 of these lines with copious comments explaining your algorithm.

Input: Big26.in.txt (contains all 26 large integers to be read-in to your program). See the reverse side for the data.

Output: Echo Print all numbers read from the input file to the console and to the output file: Big26.out.txt. Additionally, the output file and console should indicate the sum (answer to adding all 26 numbers together). The extra credit function product will be similarly echo printed to both the console and the output file.

Checklist:

a. Print hard copies of your main file, LargeTester.cpp, Big26.in.txt, and Big26.out.txt.

The contents of the input file named: Big26.in.txt

27306206970702988134943455267
266653329641143800
692463309474
77398676015767719177524639281
3576180881983944117472340747925372
46727919169057102111
308757573234218091406187416940
510359921794679320320476
3641052680337839495115059
825372641582
2598510157997889186440938229
9089793549598160057
51163593833189098463897929410008623
7760861056897584938
6674786207173262962967975825945
3810612824
63423484013383433188
9479275622359614292930536791567664
1969366697062705198402050141905
99682648675
398958598215660852932804
74540765624605446300457
71520216939
718759950466335291172205
5540984481409
79416202465135548741890

Reference no: EM131964803

Questions Cloud

Difference exists between the populations : The alternate hypothesis claims that no difference exists between the populations being tested using random sample results from each.
Determine the location and amenities for the stadium : Write a paper explaining how you will determine the location and amenities for the stadium - What sources of funding/sponsors will you seek for building
Identify presenting concerns from the client perspective : Identify presenting concerns from the client's perspective as described in the video and accompanying narrative. Include relevant cultural and systemic.
Interest rate on current debt and the initial purchases : Your interest rate on current debt and the initial purchases is 9 percent and the tax rate is zero.
Demonstrate your programming abilities in cpp : Demonstrate your programming abilities in C++ by adding a given list of the first 26 very large integers (given in this specification sheet).
What is your opinion on this issue and why : Both FCC and U.S. Federal Aviation Administration ban in-flight cellular calling. Though there are technical and security issues at play
There were no other transaction costs or finance charges : There were no other transaction costs or finance charges. How much will Audrey’s balloon payment be in eight years?
What is the stock expected price three years : ABC Enterprises' stock is expected to pay a dividend of $1 per share. What is the stock's expected price 3 years from today (i.e. solve for P3)?
How would you determine if your strategies were effective : Describe three strategies that you would try to improve their behavior and include the reasons you chose those strategies

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd