logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

For each exercise, a hardcopy package must be generated to include the following items: Cover Sheet (use the sample copy include in class/lecture note)

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

CIS25 – C++ Programming

  1. For each exercise, a hardcopy package must be generated to include the following items:
    • Cover Sheet (use the sample copy include in class/lecture note)

    • Exercise/problem statement

    • Copy of your source file (C++ program named as

cis25Fall2019YournameHw5Ex1.cpp)

  • Copy of output (copy and paste to the end of your program as PROGRAM OUTPUT COMMENT block)

  • Copy of a COMMENT block on Logic_Code_Output Issues (as a separate comment block) after your PROGRAM OUTPUT

  • All other supportive files of h, fractionYourName.cpp, fractionUltilityYourName.h, fractionUtilityYoutName.cpp, PointYourName.h, PointYourName.cpp, PointUltilityYourName.h, PointUtilityYoutName.cpp, etc.

  1. Submitting in class one hard copy for each exercise

  2. Emailing each document as follows,

    • One message for each

    • Attaching the source file that was created in Part a).

    • The SUBJECT line of the message should have the following line:

 

cis25Fall2019YourNameHw5Ex1

  1. Q.E.D.

  2. Code Assignment/Exercise

EXERCISE 1

Consider the following classes:

class FractionYourName; // From previous work and

// to be updated as discussed or needed class PointYourName; // To Be Created

The incomplete class definitions and code are given as follows (and to be updated as given in class discussions),

// Header/Specification Files

/**

  • Program Name: h

  • Discussion: Declaration File -–

  • FractionYourName class

*/

#ifndef FRACTIONYOURNAME_H #define FRACTIONYOURNAME_H

class FractionYourName { public:

// YOUR CODE HERE

//    Must have at least the default constructor,

//                             copy contructor,

//                             destructor, and

//                             assignment operator function

//    and other members

private:

int num;  // numerator will preserve fraction-negativity;

// i.e., negativity of a fraction will be

// assigned to its numerator

int denom; // non-zero value for denominator

};

// your I/O OPERATOR functions here #endif

/**

  • Program Name: h

  • Discussion: Declaration File --

  • PointYourName Class

*/

#ifndef POINTYOURNAME_H #define POINTYOURNAME_H

#include "fractionYourName.h"

// Declarations

class PointYourName { public:

// YOUR CODE HERE

//    Must have at least the default constructor,

//                             copy contructor,

//                             destructor, and

//                             assignment operator function

 

// operations

int getQuadrant() const {

// YOUR CODE HERE

}

int getQuadrant(const PointYourName& p) const {

// YOUR CODE HERE

}

void moveBy(const FractionYourName& delX, const FractionYourName& delY) {

// YOUR CODE HERE

}

void moveBy(int iOld) {  // update as needed

// YOUR CODE HERE

}

void flipByX() {  // update as needed

// YOUR CODE HERE

}

void flipByY() {  // update as needed

// YOUR CODE HERE

}

void flipThroughOrigin() {  // update as needed

// YOUR CODE HERE

}

void print() const {  // update as needed

// YOUR CODE HERE

}

// add operator functions as needed private:

FractionYourName x; // x-coordinate of the point FractionYourName y; // y-coordinate of the point

};

// your I/O OPERATOR functions here #endif

You are asked to

  • Add more member functions and operator functions as needed for the Point class; and

  • Provide complete definitions for all member functions so that the given class is proper and working properly; and

  • Add/Provide complete definitions for all needed non-member functions to perform reasonable tasks; and

  • Save all classes in appropriate *.h and *.cpp files with appropriate names; and

Run a menu program named as with a driver named as cis25Fall2019YourNameHW5Ex1.cpp (and save the output at the end of this driver).

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

626 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

564 Answers

Hire Me
expert
Husnain SaeedComputer science

510 Answers

Hire Me
expert
Atharva PatilComputer science

564 Answers

Hire Me