p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Calibri; min-height: 14.0px} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Calibri} p.p3 {margin: 0.0px 0.0px 1.5px 0.0px; font: 11.0px Calibri} p.p4 {margin: 0.0px 0.0px 0.9px 0.0px; font: 11.0px Calibri} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Calibri; min-height: 13.0px} p.p6 {margin: 0.0px 0.0px 7.5px 0.0px; font: 11.0px Calibri} p.p7 {margin: 0.0px 0.0px 2.2px 0.0px; font: 11.5px Times New Roman} p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.5px Times New Roman} p.p9 {margin: 0.0px 0.0px 1.4px 0.0px; font: 11.5px Times New Roman} p.p10 {margin: 0.0px 0.0px 2.3px 0.0px; font: 11.5px Times New Roman} span.s1 {font: 12.0px Calibri} span.s2 {font: 11.0px Courier New} span.s3 {font: 11.0px Wingdings} span.s4 {font: 11.5px Calibri} span.s5 {font: 11.5px Courier New} span.s6 {font: 11.5px Wingdings} Purpose: To help develop logic and problem solving skills while continuing to work with header files and Object Oriented constructs, including: classes, constructors and overloading. Goal: To design and implement a Roman Numeral Number class. The class should be able to build Roman numerals for various values (int parameter to constructor and to a setas* function), and be able to produce values for roman numerals (string result).For this class you only need to consider decimal (base 10) integer numbers. Turn-in: File name: assignments/assign5/assign5.cpp Programming Style Requirements: o Comment block at the top-left that includes your Linux User ID, Name, Course, Assignment Title, and Date. o Comment block Explaining purpose of the program Printed program listing, which includes sample output o 3 separate files: assign5.cpp (with sample output in comments), header and implementation file. o Hand-printed name in top right corner, stapled in top left corner. Reference Links: A few sites to help you out: o http://mathforum.org/dr.math/f... o http://www.yourdictionary.com/... o http://home.hiwaay.net/~lkseit... o http://home.hiwaay.net/~lkseit... Program Details: Your class will need to meet the following specification: Class Name: RNumber Assume integer values only o Unless noted, normal decimal integer values should be assumed o Negative values should be displayed in (~ ~), ex: -3 is (~III~) o Use normal notation, -5 for instance, on user input o For simplicity, assume max value of 1000. Input/Output options o Conversations: For input of a RNumber object, allow for: setAsRoman( string ) setAsDecimal( int) For a RNumber object, produce representations int ToInt() string ToString() You should have both a default constructor, as well as a constructor to allow for setting a value at declaration (input should allow for using either an int or a string) Overloaded Operators o << o >> o + o – o = o == o > o <
janaandolan · Apr 26, 2011 10:42 PM · 10,198 views
This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.
Start a New Discussion