COMP 220 COMP220 COMP/220 Week 7 Lab Polymorphism – Southern Alberta Institute of Technology (SAIT)
DOWNLOAD SOLUTION https://www.solvedcollegepapers.com/product/comp-220-comp220-comp-220-ait/ This lab introduces students to the concepts of polymorphism, early binding, late binding, abstract classes, and virtual class functions. This will be done in the context of performing calculations on basic geometrical shapes. Polymorphism is a very powerful extension of inheritance, and by using pointers to the base class, it allows access to derived class objects and their functions based on the context that they are called in. The lab will require the creation of a base geometric class, called Shape, and two sub classes, Circle and Rectangle, that are derived public from the class Shape. Category: Assignments Help Experts Tags: COMP 220 COMP220 COMP/220 Computer Fundamentals - Southern Alberta Institute of Technology (SAIT), COMP 220 Week 1 Lab TwoDimensional Arrays, COMP 220 Week 2 Lab Classes Objects and Encapsulation, COMP 220 Week 3 Lab Inheritance, COMP 220 Week 4 Lab Composition, COMP 220 Week 5 Lab Pointers and Pointer Operations, COMP 220 Week 6 Lab Overloaded Operators, COMP 220 Week 7 Lab Polymorphism, COMP 220comp220 lab 7, comp220 week 7, comp220 week 7 ilab
Description
Description
COMP 220 Week 7 Lab Polymorphism – Southern Alberta Institute of Technology (SAIT) This lab introduces students to the concepts of polymorphism, early binding, late binding, abstract classes, and virtual class functions. This will be done in the context of performing calculations on basic geometrical shapes. Polymorphism is a very powerful extension of inheritance, and by using pointers to the base class, it allows access to derived class objects and their functions based on the context that they are called in. The lab will require the creation of a base geometric class, called Shape, and two sub classes, Circle and Rectangle, that are derived public from the class Shape. From there, objects of both the Circle and the Rectangle classes will be created, as will an array of pointers to the base class Shape. By using the instantiated objects and the object pointers, both static and dynamic binding will be demonstrated. Deliverables 1. Submit a single NotePad file containing the source code for all the lab files to the Week 7 Dropbox. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name: for example, YourLastName_Lab5.txt. Each program should include a comment section that includes, at a minimum, your name, the lab and exercise number, and a description of what the program accomplishes. 2. Submit a lab report (a Word document) containing the following information to the Week 7 Dropbox. o Include your name and the lab or lab exercise number. o Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output. o Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results. o Summary and Conclusions: Write a statement summarizing your predicted and actual output, and identify and explain any differences. For conclusions, write at least one nontrivial paragraph that explains, in detail, either a significant problem you had and how you solved it or, if you had no significant problems, something you learned by doing the exercise. o A UML Diagram: This should show all the classes, class members, access specifiers, data types, and function arguments, along with all of the class-to-class relationships. o Answers to Lab Questions: Include the answers to all the lab questions that are asked in the lab steps.
Each lab exercise should have a separate section in the lab-report document. Your lab grade is based upon 1. 2. 3. 4. 5.
the formatting of your source code; the use of meaningful identifiers; the extent of the internal documentation; the degree to which an exercises’ specifications are met; and the completeness of your lab report.
iLAB STEPS STEP 1: Create a New Multifile Project Create a new multifile project with three classes: the base class Shape, the class Circle (derived public from Shape), and the class Rectangle (derived public from Shape). The classes will have the following requirements. 1. The class Shape should be an abstract class with the following pure virtual functions. o area() o perimeter() 2. The class Circle should be derived public from the class Shape and override both the area() and the perimeter() functions. o The perimeter() function should correctly calculate the circumference of a circle, given a radius. o The area() function should correctly calculate the area of a circle, given a radius o Include all the necessary accessor and mutator functions to accomplish the requirements of the class. 3. The class Rectangle should be derived public from the class Shape and override both the area() and the perimeter() functions. o The perimeter() function should correctly calculate the circumference of a rectangle, given its dimensions. o The area() function should correctly calculate the area of a rectangle, given its dimensions. o Include all the necessary accessor and mutator functions to accomplish the requirements of the class. STEP 2: Create the Test Function Instantiate at least one object of each of the Circle and the Rectangle classes. Provide appropriate constructors for both that will accept the necessary initialization arguments to provide the information required for all the class member functions. Exercise and test each member function of both classes for correct calculations and output. STEP 3: Add a Base Class Pointer Array and an Additional Function Add to the test function a base class array of pointers of the same dimension as the total number of Circle and Rectangle objects that were created in the previous step. Use this pointer array to access the Circle and the Rectangle objects to call a new, nonclass member function that will display all the information about each object.
1. Circle objects should display radius, circumference, and area. 2. Rectangle objects should display dimensions, perimeter. and area. The information-display function should accept as its calling parameter a pointer of the class Shape. Run the test function to demonstrate static (early) binding using the derived class objects calling their member functions, and run the test function to demonstrate dynamic (late) binding using the assigned Shape class pointers to call the nonclass, member-display-information function. Download Full Course Solution: BUS 303 Human Resource Management Entire Course Help https://www.solvedcollegepapers.com/product/bus-303-human-resource-managemententire-course-help/ BUS 303 Human Resource Management Entire Course Help> Ashford University Bus 303 Human Resource Management Week 1 Quiz 1.docx Bus 303 Human Resource Management Week 1 Quiz 1.docx BUS 303 – Fall 2018 Bus 303 Human Resource Management Week 1 Quiz 1.docx 5 pages BUS 303 Week 1 quiz.docx Download Full Course Solution: POL 255-Entire course Help: Ashford University https://www.solvedcollegepapers.com/product/pol-255-entire-course-help-ashforduniversity/ POL 255 Entire Course NEW POL 255 Week 1 Assignment Theory, Arms Races, and the Prisoner’s Dilemma NEW (2 Sets) POL 255 Week 1 Discussion IR Theories Strengths and Weaknesses NEW POL 255 Week 1 Quiz NEW POL 255 Week 2 Assignment Levels of Analysis and the Crisis in Syria NEW POL 255 Week 2 Discussion Communicating National Interests NEW POL 255 Week 2 Quiz NEW POL 255 Week 3 Assignment Moral and Ethical Dilemmas from America’s Use of Drones NEW
POL 255 Week 3 Discussion The Contemporary International System NEW POL 255 Week 3 Quiz NEW POL 255 Week 4 Assignment Easter Island Full of Mystery NEW POL 255 Week 4 DQ NEW POL 255 Week 5 DQ NEW
Download Full Course Solution: PSY 215 PSY215 PSY/215 Module Two Milestone. Shaina Dado.docx https://www.solvedcollegepapers.com/product/psy-215-psy215-psy-215-dado/ According to the findings of the Pew Research study, there are several potential costs and benefits that result from frequent exposure to social media. oDescribe one psychological benefitof frequent social media use. Social media usage can have several effects on us whether it be bad or beneficial. We use social media as a way to connect with others. Living alone after moving to a new place can be overwhelming and can make you feel lonely. Being able to connect with your loved ones, old colleagues and family through social media can help you rememberthat you aren’t alone. Seeing how others are doing through their posted photos or even through what they post can make you feel like you aren’t missing out on much. oDescribe one psychological costof frequent social media use. As there are positives to social media use, there are some costs that come with it. The frequent need for attention can become a cost when it comes to social media. Download Full Course Solution: [New Answers]-Full course CMIT-200: Relational Database Design and SQL https://www.solvedcollegepapers.com/product/cmit-200-relational-database-design-andsql/ Course Description and Prerequisites A relational database management system (RDBMS) is the heart of most modern information systems. This is a survey course in relational database design, development, and implementation. The course covers key concepts of database design using entity relationship diagrams (ERDs), normalization, and functional dependence. Logical and physical schemas and the use of Structured Query Language (SQL) to query data will be studied in depth. Student learning is reinforced through discussions and hands-on laboratory assignments. Students will complete a relational database project by using a relational database management system. This course is intended for anyone who is involved in designing, developing, or implementing relational database management systems (e.g., users, IT managers, technical staff, and other IT team members).
Prerequisite: CMIT-135 Student-Centered Learning Outcomes
Design a relational database using entity relationship diagrams and SQL Normalize relational database tables through third normal form (3NF) Differentiate between conceptual, logical, and physical database designs Specify different types of relationships between database entities and objects Physically create databases using SQL Data Definition Language (DDL) Query databases using SQL Data Manipulation Language (DML)