Developing an adt with overloaded operators

Assignment Help Programming Languages
Reference no: EM13782865

The purpose of this assignment is to practice developing an ADT with overloaded operators and separate compilation. For this project we will be developing an ADT for integers.

First create a separate directory for this assignment

mkdir proj7

cd proj7

Then copy the my_int.h and main.cc from my directory intoproj7 directory.

cp /home/kmgsubm/f14_2400/proj7/* .

You may add other functions, but DO NOT change any functions or function names in the my_int.h class

Before you begin working on this program please look at Money.h, Money.cc and main.cc on Blackboard. You can also copy these files from my directory. cp /home/kmgsubm/f14_2400/week13/Money/* .

Class Description

A default constructor - initialize the value to zero

A constructor that takes one argument for the initial value of val.

A set function set the value to the incoming argument.

An extraction operator (>>) that allows user to enter the integer from the keyboard or from a data file.

An insertion operator (<<) that outputs the integer to the screen or to an output file.

One accessor function for the private member variable.

Overload the operator +, -, %, *,<=, >> and << as friend functions of the class and increment and decrement operators as member functions of the class. Also *, / and == operators and non-member functions of the class.

For this program input is from the keyboard and output is written to the screen.

Finally you have to make sure that you have 3 files in your proj6 directory.

The interface file (my_int.h)

The implementation file consists of all the function definitions of the class. And this file will be saved as a my_int.cc file. You have to include your interface file in your implementation file along with other include directives in the

following manner: #include "my_int.h"

This file can contain short (one- or two-line) comments for each function and header block with you name, date etc.

Your main function (application file) saved as a .cc file.

When you are compiling you have to include both .cc files. Do not compile the .h file.

g++ -Wall main.cc my_int.cc

OR g++ -Wall *.cc

Note: Before submitting the program make sure that you are in the correct directory and it contain 3 files. (interface file implementation file, application file)

Also turn in your implementation file with a cover sheet showing name/date/time on Tuesday December 3rd

- Documentation - header comments (for implementation) , style etc. - Functions

- Electronic submission (3 files) and source code (implementation file) -

Reference no: EM13782865

Questions Cloud

How do executive support systems help senior managers : Topic: Enhancing Decision Making 1. How do executive support systems (ESS) help senior managers make better decisions? 2. What is the role of the information systems in helping people working in a group make decisions more efficiently?
What can be added to this db to make it more interesting : What Can be Added to this DB to make it More Interesting to a Professor or More Beneficial to a Student Reading it
Discuss organizational architecture and corporate culture : Discuss how organizational architecture and corporate culture are related. Use an example of a real-life firm and discuss how its corporate culture blends with its organizational architecture.
Strengths and limitations of this sampling technique : In 2-3 paragraphs discuss the sampling technique you plan to utilize in your research design? What are the strengths and limitations of this sampling technique
Developing an adt with overloaded operators : The purpose of this assignment is to practice developing an ADT with overloaded operators and separate compilation. For this project we will be developing an ADT for integers.
What skills does a non-legal person need as an employee : Consider how the world of business interacts with the legal realm. What skills does a non-legal person need as an employee
Write a responce to each given post seperatly : RESPOND TO EACH SEPERATLY WITH 100-150 WORDS. ATTACHED IS A SHORT DOCUMENT THAT YOU SHOULD READ AND IT WILL HELP YOU AGUE AS YOU RESPOND.
Discuss if telemedicine is viewed as a necessary reaction to : Discuss if telemedicine is viewed as a necessary reaction to a competitive threat or a new source of revenue?
What damages may she recover from johnny : Frida agrees to sell a car to Johnny for $900. However, Johnny reneges on the written contract. Frida is able to find another buyer for the car at $700. What damages may she recover from Johnny

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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