CIS 25 — OOP in C++; Homework #3 - Page 1 of 8 Turn In: Exercise #1 - Due on Monday, April 25, 2022 by 11:00 pm Email Su

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

CIS 25 — OOP in C++; Homework #3 - Page 1 of 8 Turn In: Exercise #1 - Due on Monday, April 25, 2022 by 11:00 pm Email Su

Post by answerhappygod »

Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 1
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 1 (130.69 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 2
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 2 (110.94 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 3
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 3 (85.22 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 4
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 4 (76.12 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 5
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 5 (82.25 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 6
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 6 (89.21 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 7
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 7 (99.09 KiB) Viewed 64 times
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 8
Cis 25 Oop In C Homework 3 Page 1 Of 8 Turn In Exercise 1 Due On Monday April 25 2022 By 11 00 Pm Email Su 8 (179.42 KiB) Viewed 64 times
CIS 25 — OOP in C++; Homework #3 - Page 1 of 8 Turn In: Exercise #1 - Due on Monday, April 25, 2022 by 11:00 pm Email Submission 1. For each exercise, a package must be generated to include the following items: Copies of your files (*.h and *.cpp), which are named as follows, 1. Program Driver: cis25Spring2022YourName Hw3.cpp 2. Declaration/Specification: fraction Your Name.h fractionUtilityYourName.h cis 25 Your Name Hw3Utility.h 3. Definition/Implementation: fraction Your Name.cpp fractionUtilityYourName.cpp cis25YourName Hw3Utility.cpp "YourName" should be replaced with your Firstname (full) and the initial of your lastname. Copy of output (copy and paste to the end of your program as PROGRAM_OUTPUT comment block). This copy of the output should be included in the program driver. Copy of Logic_code_Output_COMMENTS (as a separate comment block) after the PROGRAM_OUTPUT. This copy of the Logic_code_Output_COMMENTS should be included in the "Program Driver". 2. Emailing each package as follows, One email message for each exercise. The SUBJECT line of the message should have the following line: cis25 Spring2022YourNameHw3.cpp Attaching the above *.h and *.cpp files that was created in Part 1. 3. Reminder! Getting the program to work is not enough to earn full credit. Your program must run correctly and follow all proper convention and consistent styles as explained in class in order to receive credit accordingly. 4. We write code to manipulate data, which are provided by the user(s), to produce the required outcome in the most efficient way! 5. Q.E.D. Important Note! • Except iostream (or iostream.h), you are not allowed to include any files that you did not write/create. You are not allowed to use any code that you did not write. You are only allowed to used and what being instructed in class. All required outputs, details, and displays should be kept the same explanation to be given in class meetings. Read the posted document cppCodingConventionStyle20220209.cpp.cpp to avoid silly mistakes and penalties! .

CIS 25 - OOP in C++; Homework #3 - Page 2 of 8 1. Code Assignment/Exercise EXERCISE 1 - Due on Monday, April 25, 2022 by 11:00 pm Email Submission 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 least 3 constructors of (1) Default; and Copy; and (iii) Fraction(int n, int d) Each constructor should print the confirmation (e.g., "Calling Fraction ()", "Calling Fraction (const Fraction&)", or "Calling Fraction (int, int)"). C. 3. Provide a destructor with a confirmation when removing the object (i.e., "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 displayCommon PalindromeDigit(); and A gcd) 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 Fraction object. e. An appropriate runMenuHw3() function to produce the required output as displayed below; and f. Other functions as needed. C. Run a driver/program named as cis 25Spring2022Your 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: Submitted Date: HW #3 Exercise #1 Your Name 2022/04/25

CIS 25 OOP in C++; Homework #3 - Page 3 of 8 Current Number of LEB available: ? Allowed Number of LEB Used: ? Remaining Number of LEB: ? (b) Then, the output screen should be followed by a sample output as follows, MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommon PalindromeDigit() * 4. Printing * 5. Quit Select an option (use integer value only): 6 WRONG OPTION! * MENU - HW #3 1. Initializing 2. ispalindrome ( ) 3. Using displayCommonPalindromeDigit() 4. Printing * 5. Quit Select an option (use integer value only): 2 Palindrome Option -- Not a proper option as there is no Fraction! 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()! 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 OOP in C++; Homework #3 - 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! 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: -5 denom: 959 MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommon PalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 2

CIS 25 - OOP in C++; Homework #3 - Page 5 of 8 Palindrome Option - The current Fraction is a Palindrome! MENU - HW #3 1. Initializing 2. ispalindrome ( ) 3. Using displayCommonPalindromeDigit() 4. Printing * 5. Quit ****** Select an option (use integer value only): 3 displayCommonPalindromeDigit() Option - There is/are 1 common digit(s) of 5 * * MENU - HW #3 1. Initializing 2. ispalindrome) 3. Using displayCommon PalindromeDigit() 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 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! MENU - HW #3

Page 6 of 8 CIS 25 — OOP in C++; Homework 1. Initializing 2. ispalindrome () 3. Using displayCommonPalindromeDigit() 4. Printing * 5. Quit * Select an option (use integer value only): 4 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 2. ispalindrome) 3. Using displayCommonPalindromeDigit() * 4. Printing * 5. Quit * Select an option (use integer value only): 3 displayCommonPalindromeDigit() Option - The current Fraction is not a Palindrome! MENU - HW #3 1. Initializing 2. ispalindrome() 3. Using displayCommon PalindromeDigit() 4. Printing 5. Quit Select an option (use integer value only): 1 INITIALIZING Option - Calling runMenuInit()! SubMENU - INITIALIZING 1. Creating 2. Updating

CIS 25 OOP in C++; Homework #3 - Page 7 of 8 * 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. ispalindrome) 3. Using displayCommonPalindromeDigit() 4. Printing * 5. Quit Select an option (use integer value only): 5 Having fun ...! D. Save the program as cis25Spring2022our Name Hw3.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 cis25 Spring2022YourNameHw3.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 Comments!" as content of this block. . . Note! • You are only allowed to use cout and cin from the iostream include header. • You are not allowed to use any other classes or syntax structures that are not introduced in class and class meetings - please confirm with the instructor if you have any doubt!

CIS 25 — OOP in C++; Homework #3 – Page 8 of 8 • You are not allowed to use class’es, struct's, and functions written by someone else. • You must create all class’es, struct’s, and functions on your own for usage in all of required class works. • The values of the elements from the created array, it any, MUST NOT be changed/modified at all during the analysis steps and process unless they are required to be updated or changed based on the specified tasks. • All struct, class, and type names must have the initials of your first and last names at the end. • All local variables must be declard at the top of its function. • All variable names must have the initials of your first and last names at the end. • All function names must have your complete firstname and initial of your lastname at the end. • All filenames must have your complete firstname and initial of your lastname as required. Note! Except iostream (or iostream.h), you are not allowed to include any files that you did not write/create. You are not allowed to use any code that you did not write. You are only allowed to used syntax and what being instructed in class. Getting the program to work is not enough to earn full credit. Your program must run correctly and follow all proper convention and consistent styles as explained in class in order to receive credit accordingly. • We write code to manipulate data, which are provided by the user(s), to produce the required outcome in the most efficient way!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply