Create the roman.h and implement roman class in roman.cpp

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

Submit your assignment on-line using the course web page.

Assignment consists of two tasks. Task 2 is divided into 3 parts.

You are required to submit:
- Task 1: task1.cpp, number.cpp, number.h, task1.txt
- Task 2a: task2a.cpp, roman.cpp, roman.h, task2a.txt

You will be using the same number.cpp and number.h as in task 1.

- Task 2b: task2a.cpp, binary.cpp, binary.h, task2b .txt

You will be using the same number.cpp and number.h as in task 1 and same roman.cpp and roman.h as in task 2a.
- Task 2c: task2c.cpp, task2c.txt

You will be using the same number.cpp and number.h as in task 1, same roman.cpp and roman.h as in task 2a, and same binary.cpp and binary.h as in task 2b.

The .cpp file should have the program code and comments about the algorithm and the coding. We may compile the .cpp files if required. The documentation files should contain the compilation messages and sample runs for each application program. All files must be in pure text format. No PDF, HTML, Word files, Open Office files, RTF etc. and no compression or archiving such as zip, rar, tar etc.

If you are using Codelite, the compilation messages can be copied and pasted with the usual crtl-c and crtl-v. For output of sample runs, right click the title bar of the command window, select EDIT/MARK and then highlight the output. With the output selected, right click the title bar of the command window, select EDIT/COPY. Position your cursor to a (new) text file opened in a text editor such as Notepad, and crtl-v will paste the copied output to the text file.

If you are using MinGW, right click the title bar of the command window; select EDIT/MARK and then high light the output. With the output selected, right click the title bar of the command window, select EDIT/COPY. Position your cursor to a (new) text file opened in a text editor such as Notepad, and crtl-v will paste the copied output to the text file. If you are using Linux, you can cut and paste the output on the terminal window into a text such as vim.

Task 2

Using the Number class as the base class, derive a Roman class:
- The Roman class is the same as Number class except it also stores the integer as a Roman numeral.
- If a Roman is created without an initial value, then the Roman numeral is "INVALID".
- You are not allowed to use arrays, atoi(), atol(), atof(), printf(), sprintf(), fprintf(), vfprintf(), vprintf(),
vsprintf(), scanf(), sscanf(), fscanf(). Feel free to use any other library functions provided by MinGW.

Create the roman.h and implement the Roman class in roman.cpp. Make sure that you put in measures to prevent multiple inclusion of the header file. Test your implementation using task2a.cpp.

Task2a.cpp should:
- Create Roman one
- Without initial value;
- Display one as an integer;
- Display one in US style;
- Display one in EURO style;
- Display one as a Roman numeral;
- Set one to 2014
- Display one as an integer;
- Display one in US style;
- Display one in EURO style;
- Display one as a Roman numeral;
- Create Roman two
- With initial value 22;
- Display two as an integer;
- Display two in US style;
- Display two in EURO style;
- Display two as a Roman numeral;
- Create Roman three
- With initial value 2402;
- Display three as an integer;
- Display three in US style;
- Display three in EURO style;
- Display three as a Roman numeral


Attachment:- Assignment-2-v5.pdf

Reference no: EM13317606

Questions Cloud

Determine the pressure required to increase the jet velocity : Assume the flow is incompressible, irrotational, quasi-steady and the only body force acting is gravity. Determine the pressure, pb, required to increase the jet velocity by 50% relative to the value realized for atmospheric pressure, pa, in the u..
Describe and analyze an algorithm : Describe and analyze an algorithm to determine, given the initial sequence of cards, the maximum number of points that you can collect playing against a perfect opponent.
Determine the coefficient of statics friction of hawser : Determine the (a) the coefficient of statics friction between the hawser and the bollard. (b) the number of times the hawser should be wrapped around the bollard if a 20000 pound force is to be resisted by the same 80 pound force
What is the speed of each sphere when they are far apart : Three small spheres, each have a charge of 3.60 %u03BCC, are arranged in a line, with sphere 2 in the middle. Adjacent spheres are initially 8.70 cm apart. What is the speed of each sphere when they are far apart
Create the roman.h and implement roman class in roman.cpp : Create the roman.h and implement the Roman class in roman.cpp. Make sure that you put in measures to prevent multiple inclusion of the header file. Test your implementation using task2a.cpp.
Find range of value of p for which equilibrium is maintained : a 300 lb block is supported by a rope that was wrapped 1 1/2 times around a horizontal rod. Knowing that the coefficient of static friction is .15 determine the range of values of P for which equilibrium is maintained
What is the size of the aperture : The distance from the center of a circular diffraction pattern to the first dark ring is 15,000 wavelengths on a screen that is 0.85 m away
The short run and the long run in production : Explicit costs and implicit costs,economic profit and accounting profit, and
Determine the wavelength of the light from the laser : A Heliun-Neon laser illuminates a narrow, single slit that is 1850 nm wide. Determine the wavelength of the light from the laser

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Make a class constructor that initializes a customer

Make a class constructor that initializes a customer with a name, number, and order size.Make class member functions to print each of: name, number, and order size.

  Create a program that contains 4 methods

Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main() method should call the getTestScores() method to get and return each of 3 test scores.

  Implement class bankacct for bank usq

Implement class BankAcct, for Bank of USQ, using bankacct.cpp and bankacct.h and Implement an application bankUSQ_app.cpp

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  20 integers saved in a file called "data.txt"

There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10

  Implement a standard sorted linked list class

Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

  Program to compute gross wages for employee using array

Write program which uses the following arrays: payRate: array of seven floats to hold each employee's hourly pay rate. wages: array of seven floats to hold each employee's gross wages.

  Generate a set of 75 random integers in the range -26 to + 4

Write a program that will generate a set of 75 random integers in the range -26 to + 42. The program

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Use a loop in main to efficiently handle all three persons

Plan and finish writing the main program, and all the functions, including a constructor. Use a loop in main to efficiently handle all three persons' data.

  Design a fraction class

Design a fraction class. The class should have 2 data members to represent the numerator and denominator. Both of these numbers should obviously be integers. It should be able to display a fraction and include an operator for performing multiplica..

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