






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Laguna; Class: Data Structures Concepts; Subject: Computer Science; University: California State University - Fullerton; Term: Spring 2009;
Typology: Assignments
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Menu Driver: February 19, 2009 at 1:00 p.m. Class: February 26, 2009 at 1:00 p.m. Program: March 10, 2009 at 1:00 p.m.
Egyptian Math Write a C++ program that adds and subtracts Egyptian numbers. The Egyptian numbers are: Decimal Egyptian Symbol Represents Computer Symbol 1 staff I 10 heel bone N 100 coil of rope 9 1000 lotus flower L 10000 pointing finger / 100000 tadpole O 1000000 astonished man Y Note: The Egyptian numbers is in base 10. Representing Egyptian numbers: 92 = = IINNNNNNNNN 46,206 = = IIIIII99LLLLLL////
Adding two Egyptian numbers: (= 456) (= 265) Combine together And reduce (=721) Computer Symbols IIIIIINNNNN9999 + IIIIINNNNNN99 = IIIIIIIIIIINNNNNNNNNNN999999 = INN
Computer Symbols IIIIIINNNNN9999 - IIIIINNNNNN99 = INNNNNNNNN
Your program will be written as a menu driver which means that you will display a menu to select the operation that is wanted. (p. 230 – 250; p.
You need to design and code a class called EgyptianMathType. The storage component for the Egyptian number should be an array of 50 characters or a string. The following public functions must appear in your class: (You may use private functions if needed.) Get Egyptian Number /* Function: Gets both Egyptian numbers Precondition: Postcondition: / Add Egyptian Numbers / Function: Adds both Egyptian numbers together Precondition: Postcondition: / Subtract Egyptian Numbers / Function: Subtracts first Egyptian number from the second Egyptian number. Precondition: Postcondition: / Print Egyptian Number / Function: Prints both Egyptian numbers with appropriate + or – and the result. Precondition: Postcondition: */
working and turn in your class.
Menu Driver: February 19, 2009 at 5:30 p.m. Class: February 26, 2009 at 5:30 p.m. Program: March 10, 2009 at 5:30 p.m.
Egyptian Math Write a C++ program that adds and subtracts Egyptian numbers. The Egyptian numbers are: Decimal Egyptian Symbol Represents Computer Symbol 1 staff I 10 heel bone N 100 coil of rope 9 1000 lotus flower L 10000 pointing finger / 100000 tadpole O 1000000 astonished man Y Note: The Egyptian numbers is in base 10. Representing Egyptian numbers: 92 = = IINNNNNNNNN 46,206 = = IIIIII99LLLLLL////
Adding two Egyptian numbers: (= 456) (= 265) Combine together And reduce (=721) Computer Symbols IIIIIINNNNN9999 + IIIIINNNNNN99 = IIIIIIIIIIINNNNNNNNNNN999999 = INN
Computer Symbols IIIIIINNNNN9999 - IIIIINNNNNN99 = INNNNNNNNN
Your program will be written as a menu driver which means that you will display a menu to select the operation that is wanted. (p. 230 – 250; p.
You need to design and code a class called EgyptianMathType. The storage component for the Egyptian number should be an array of 50 characters or a string. The following public functions must appear in your class: (You may use private functions if needed.) Get Egyptian Number /* Function: Gets both Egyptian numbers Precondition: Postcondition: / Add Egyptian Numbers / Function: Adds both Egyptian numbers together Precondition: Postcondition: / Subtract Egyptian Numbers / Function: Subtracts first Egyptian number from the second Egyptian number. Precondition: Postcondition: / Print Egyptian Number / Function: Prints both Egyptian numbers with appropriate + or – and the result. Precondition: Postcondition: */
working and turn in your class.