Question: please use C++ only input can be seen. CIS 25 - C++ Programming Laney College Your Name Information Assignment: Implemented by: HW #3 Exercise #1






input can be seen. CIS 25 - C++ Programming Laney College Your Name Information Assignment: Implemented by: HW #3 Exercise #1 Your Name CIS 25 Spring 2021 - Homework #3 Update #1 - Page 3 of 8 Submitted Date: 2021/03/15 Current Number of LEB available: ? Allowed Number of LEB Used: Remaining Number of LEB: (b) Then, the output sereen should be followed by a sample output as follows. MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): WRONG OPTION! MENU - HN #3 1. Initializing 2. ispalindrome() 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): Palindrome Option -- Not a proper option as there is no Fraction! MENU - HW33 1. Initializing 2. ispalindrome() 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): INITIALIZING Option - Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating 2 adating Not a proper option as there is no Fraction! MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit ............. Select an option (use integer value only): 1 INITIALIZING Option - Calling runMenuInit()! SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option integer only): 2 Not a proper option as there is no Fraction! CIS 25 Spring 2021 - Homework #3 Update #1 - Page 4 of 8 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 5 WRONG OPTION! SubMENU - INITIALIZING . 1. Creating 2. Updating 3. Returning Select an option (integer only): 1 Creating 1 NEW Fraction object -- Calling create()! Enter num: 5 Enter denom: -959 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! INITIALIZING Option Calling runMenuInit()! SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning *** Select an option (integer only): 2 Updating an EXISTING Fraction object - Calling update()! Enter num: 15681e8ee Enter denom: 49914173 SubMENU - INITIALIZING . 1. Creating 2. Updating . 3. Returning Select an option (Integer only): 3 Returning to previous menu! CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HN 3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): PRINTING Option -- Address: 0041FDD4 num: 156810000 denom : 49914173 MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 2 Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing INITIALIZING Option - Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating 2. Updating . 3. Returning . Select an option integer only): 2 Updating an EXISTING Fraction object .. Calling update()! Enter num: 156810000 Enter denom: 49914173 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! *eeeee CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HW #3 1. Initializing 2. ispalindrome() . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): PRINTING Option -- Address : 2941FDD4 num: 156810000 denom: 49914173 .... MENU - HW 83 1. Initializing 2. ispalindrome) . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() . 4. Printing 5. Quit Select an option (use integer value only): 4 PRINTING Option -- Address : 0041FDD4 num ! 15681000e denom : 49914173 MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 2 Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): displayCommonpalindromeDigit() Option - The current Fraction is not a Palindrome! ........... MENU - HW #3 1. Initializing 2. ispalindrome) . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 1 INITIALIZING Option Calling runMenuInit()! ... *O*** SubMENU - INITIALIZING 1. Creating . Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating CIS 25 Spring 2021 - Homework #3 Update #1 - Page 7 of 8 2. Updating 3. Returning Select an option (Integer only): 1 Please update or return! SUBMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! MENU - HW #3 . 1. Initializing 2. 1sPalindrome() : 3. Using displayCommonpalindroneDigit() 4. Printing 5. Quit Select an option (use integer value only): 1 Having fun ...! D. Save the program as cis25Spring2e21Your NameHw3.cpp Reminder! In your program, no GLOBAL DATA are allowed, and you must write all needed functions (no library functions are allowed - Except for cin and cout and their functions/manipulators). All user-created objects must be dynamic. All dynamic allocations must be released properly! Name your application driver program as cis25Spring2021 YourNamex3.cpp For submission, test your output with data as above. Attach the output at the end of your application program (as comment). And, again followed with a comment block about your logic, code issues, and any other comments that you may have - You MUST PROVIDE this comment block even with a "No Commentstas content of this black Note: You are only allowed to use cout and cin from the sestream include header CIS 25 Spring 2021 - Homework #3 Update #1 - Page 1 of 8 Turn In: 1. Exercise #1 - Due on Tuesday, March 15, 2021 by 11:00pm Email Submission a) For each exercise, a package must be generated to include the following items: Copy of your source file (C++ program)--your source file MUST BE NAMED as cis25Spring2021 Your Name Hw3.cpp Besides the submitting the above driver, create and submit . fraction Your Name.h fraction Your Name.cpp fractionUtility Your Name.h . fractionutility Your Name.cpp hw3Utility.h hw3UtilityYour Name.cpp Copy of output (copy and paste to the end of your program as PROGRAM_OUTPUT comment block) Copy of Logic_code_Output_Issues (as a separate comment block) after the "PROGRAM_OUTPUT" block. b) Emailing each package as follows, One email message for each exercise The SUBJECT line of the message should have the following line: cis25 Spring2021 Your Name Hw3.cpp Attaching the source file that was created in part a). 2. Q.E.D. CIS 25 Spring 2021 Homework #3 Update 1 - Page 2 of 8 1. Code Assignment/Exercise Exercise 1 A. Update the Fraction class given in the Lecture notes or as discussed in class meetings as follows, 1. Add your FIRST NAME and the initial of your last name to the name Fraction and use this as your updated class. For examples, if your first name is John Smith then update the class name to be FractionJohns. 2. Add and update all class constructors for your Fraction class to handle the initialization appropriately There must be as Icast 3 constructors of (1) Default; and Copy: and (iii) Fraction(int n, int d) Each constructor should print the confirmation (c.g. "Calling Fraction()". "Calling Fraction (const Fraction)", or "Calling Fraction (int, int)). 3. Provide a destructor with a confirmation when removing the object (i... "Calling -Fraction()"). 4. Provide get()/set() member functions for each private member data. 5. A member function print() that will print the current Fraction object. B. Provide the following member functions, a. A member function ispalindrome(), which is a predicate, to return true/false if the Fraction object is a Palindrome; and b. A function displayCommonPalindromeDigit(); and c. Agcd) helper to reduce the Fraction object; and C. Provide the following stand-alone functions, d. A function init() to set up or update the required Praction object e. An appropriate run Menu Hw3() function to produce the required output as displayed below; and f. Other functions as needed C. Run a driver/program named as cis25spring 2021 Your NameHw3.cpp and record the output shown below (a) The output screen should have the following lines displayed before any other display or input can be seen, CIS 25 - C++ programming Laney College Your Name Information -- Assignment: Implemented by: HW #3 Exercise #1 YourName input can be seen. CIS 25 - C++ Programming Laney College Your Name Information Assignment: Implemented by: HW #3 Exercise #1 Your Name CIS 25 Spring 2021 - Homework #3 Update #1 - Page 3 of 8 Submitted Date: 2021/03/15 Current Number of LEB available: ? Allowed Number of LEB Used: Remaining Number of LEB: (b) Then, the output sereen should be followed by a sample output as follows. MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): WRONG OPTION! MENU - HN #3 1. Initializing 2. ispalindrome() 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): Palindrome Option -- Not a proper option as there is no Fraction! MENU - HW33 1. Initializing 2. ispalindrome() 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): INITIALIZING Option - Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating 2 adating Not a proper option as there is no Fraction! MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayConnonPalindromeDigit() 4. Printing 5. Quit ............. Select an option (use integer value only): 1 INITIALIZING Option - Calling runMenuInit()! SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option integer only): 2 Not a proper option as there is no Fraction! CIS 25 Spring 2021 - Homework #3 Update #1 - Page 4 of 8 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 5 WRONG OPTION! SubMENU - INITIALIZING . 1. Creating 2. Updating 3. Returning Select an option (integer only): 1 Creating 1 NEW Fraction object -- Calling create()! Enter num: 5 Enter denom: -959 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! INITIALIZING Option Calling runMenuInit()! SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning *** Select an option (integer only): 2 Updating an EXISTING Fraction object - Calling update()! Enter num: 15681e8ee Enter denom: 49914173 SubMENU - INITIALIZING . 1. Creating 2. Updating . 3. Returning Select an option (Integer only): 3 Returning to previous menu! CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HN 3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): PRINTING Option -- Address: 0041FDD4 num: 156810000 denom : 49914173 MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 2 Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing INITIALIZING Option - Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating 2. Updating . 3. Returning . Select an option integer only): 2 Updating an EXISTING Fraction object .. Calling update()! Enter num: 156810000 Enter denom: 49914173 SubMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! *eeeee CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HW #3 1. Initializing 2. ispalindrome() . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): PRINTING Option -- Address : 2941FDD4 num: 156810000 denom: 49914173 .... MENU - HW 83 1. Initializing 2. ispalindrome) . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing CIS 25 Spring 2021 - Homework #3 Update #1 - Page 6 of 8 MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() . 4. Printing 5. Quit Select an option (use integer value only): 4 PRINTING Option -- Address : 0041FDD4 num ! 15681000e denom : 49914173 MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 2 Palindrome Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): displayCommonpalindromeDigit() Option - The current Fraction is not a Palindrome! ........... MENU - HW #3 1. Initializing 2. ispalindrome) . 3. Using displayCommonPalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 1 INITIALIZING Option Calling runMenuInit()! ... *O*** SubMENU - INITIALIZING 1. Creating . Calling runMenu Init()! SubMENU - INITIALIZING 1. Creating CIS 25 Spring 2021 - Homework #3 Update #1 - Page 7 of 8 2. Updating 3. Returning Select an option (Integer only): 1 Please update or return! SUBMENU - INITIALIZING 1. Creating 2. Updating 3. Returning Select an option (integer only): 3 Returning to previous menu! MENU - HW #3 . 1. Initializing 2. 1sPalindrome() : 3. Using displayCommonpalindroneDigit() 4. Printing 5. Quit Select an option (use integer value only): 1 Having fun ...! D. Save the program as cis25Spring2e21Your NameHw3.cpp Reminder! In your program, no GLOBAL DATA are allowed, and you must write all needed functions (no library functions are allowed - Except for cin and cout and their functions/manipulators). All user-created objects must be dynamic. All dynamic allocations must be released properly! Name your application driver program as cis25Spring2021 YourNamex3.cpp For submission, test your output with data as above. Attach the output at the end of your application program (as comment). And, again followed with a comment block about your logic, code issues, and any other comments that you may have - You MUST PROVIDE this comment block even with a "No Commentstas content of this black Note: You are only allowed to use cout and cin from the sestream include header CIS 25 Spring 2021 - Homework #3 Update #1 - Page 1 of 8 Turn In: 1. Exercise #1 - Due on Tuesday, March 15, 2021 by 11:00pm Email Submission a) For each exercise, a package must be generated to include the following items: Copy of your source file (C++ program)--your source file MUST BE NAMED as cis25Spring2021 Your Name Hw3.cpp Besides the submitting the above driver, create and submit . fraction Your Name.h fraction Your Name.cpp fractionUtility Your Name.h . fractionutility Your Name.cpp hw3Utility.h hw3UtilityYour Name.cpp Copy of output (copy and paste to the end of your program as PROGRAM_OUTPUT comment block) Copy of Logic_code_Output_Issues (as a separate comment block) after the "PROGRAM_OUTPUT" block. b) Emailing each package as follows, One email message for each exercise The SUBJECT line of the message should have the following line: cis25 Spring2021 Your Name Hw3.cpp Attaching the source file that was created in part a). 2. Q.E.D. CIS 25 Spring 2021 Homework #3 Update 1 - Page 2 of 8 1. Code Assignment/Exercise Exercise 1 A. Update the Fraction class given in the Lecture notes or as discussed in class meetings as follows, 1. Add your FIRST NAME and the initial of your last name to the name Fraction and use this as your updated class. For examples, if your first name is John Smith then update the class name to be FractionJohns. 2. Add and update all class constructors for your Fraction class to handle the initialization appropriately There must be as Icast 3 constructors of (1) Default; and Copy: and (iii) Fraction(int n, int d) Each constructor should print the confirmation (c.g. "Calling Fraction()". "Calling Fraction (const Fraction)", or "Calling Fraction (int, int)). 3. Provide a destructor with a confirmation when removing the object (i... "Calling -Fraction()"). 4. Provide get()/set() member functions for each private member data. 5. A member function print() that will print the current Fraction object. B. Provide the following member functions, a. A member function ispalindrome(), which is a predicate, to return true/false if the Fraction object is a Palindrome; and b. A function displayCommonPalindromeDigit(); and c. Agcd) helper to reduce the Fraction object; and C. Provide the following stand-alone functions, d. A function init() to set up or update the required Praction object e. An appropriate run Menu Hw3() function to produce the required output as displayed below; and f. Other functions as needed C. Run a driver/program named as cis25spring 2021 Your NameHw3.cpp and record the output shown below (a) The output screen should have the following lines displayed before any other display or input can be seen, CIS 25 - C++ programming Laney College Your Name Information -- Assignment: Implemented by: HW #3 Exercise #1 YourName
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
