Create a class POINT to represent a point in Cartesian coordinate system Choose
appropriate data members. Provide member functions:
Default constructor
Parameterized constructor
Input
Output
Distance( returns the distance between two POINT objects, the function takes one object
as an input)
isZero(determines if a point is the center)
Midlepoint(returns the middle point , takes one object as an input and returns the answer
in a POINT object)
isEqualTo (compare two POINTs)
isGreaterThan (compares two POINT in terms of the distance from the center )
o Above two function takes one POINT object as an argument and returns true if
the condition is satisfied and false otherwise.
plz solve it with C++.
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
- CONSTRUCTOR// IntSet()// Pre: (none)// Post: The invoking IntSet is initialized to an empty// IntSet (i.e., one containing no relevant elements).// CONSTANT MEMBER FUNCTIONS (ACCESSORS)// int size() const// Pre: (none)// Post: Number of elements in the invoking IntSet is returned.// bool isEmpty() const// Pre: (none)// Post: True is returned if the invoking IntSet has no relevant// relevant elements, otherwise false is returned.// bool contains(int anInt) const// Pre: (none)// Post: true is returned if the invoking IntSet has anInt as an// element, otherwise false is returned.// bool isSubsetOf(const IntSet& otherIntSet) const// Pre: (none)// Post: True is returned if all elements of the invoking IntSet// are also elements of otherIntSet, otherwise false is// returned.// By definition, true is returned if the invoking IntSet// is empty (i.e., an empty IntSet…arrow_forwardWhen a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have access to the other's private members. True Falsearrow_forwardExercise 1-Account class • Design a class named Account that contains : • A private int data field named id for the account • A private double data field named balance for the account • A privet Date data field named dateCreated that stores the date when the account was created • A no-arg constructor that creates a default account • A constructor that creates an account with the specified id and initial balance • The getters (i.e., accessors) and setters (i.e., mutators) methods for id and balance • The getter method for dateCreated • A method named withdraw that withdraws a specified amount from the account • A method named deposit that deposits a specified amount to the accountarrow_forward
- Create a class of type student .Members will include: name, gpa, rank (year) Make sure all data is private and all functions are public. Write member functions to:Set or initialize the dataRetrieve the data (get’em and set’em )Announce names of students who are eligible for a scholarship (those who have a GPA of 3.0 or higher)The program will declare at least two objects (pupils) of your new class and test each of the functions (OR if you would like to try your hand at vectors, create them dynamically- this may require a little research/review on your part).arrow_forwardTrue or False ___(1) An abstract class can have fields. ___(2) You can create an object from an abstract class _ _(3) An abstract class can have both abstract methods and methods that have method bodyarrow_forwardIt is possible to express the relationship that exists between classes and objects.arrow_forward
- Object adapters and class adapters each provide a unique function. These concepts are also significant due to the significance that you attach to them.arrow_forwardCreate a Class called Transaction with: instance variables: stock - your stock class type - char -> b or s (buy/sell) quantity - can be fractional price - buy/sell price when - LocalDate constructors: constructor with parameters for stock, type and quantity. - sets the price from the stock price instance variable - sets when from LocalDate getters and setters for each instance variablearrow_forwardINVENTORY CLASS You need to create an Inventory class containing the private data fields, as well as the methods for the Inventory class (object). Be sure your Inventory class defines the private data fields, at least one constructor, accessor and mutator methods, method overloading (to handle the data coming into the Inventory class as either a String and/or int/float), as well as all of the methods (methods to calculate) to manipulate the Inventory class (object). The data fields in the Inventory class include the inventory product number (int), inventory product description (String), inventory product price (float), inventory quantity on hand (int), inventory quantity on order (int), and inventory quantity sold (int). The Inventory class (java file) should also contain all of the static data fields, as well as static methods to handle the logic in counting all of the objects processed (counter), as well as totals (accumulators) for the total product inventory and the total product…arrow_forward
- Java - Calculator Classarrow_forwardclass IndexItem { public: virtual int count() = 0; virtual void display()= 0; };class Book : public IndexItem { private: string title; string author; public: Book(string title, string author): title(title), author(author){} virtual int count(){ return 1; } virtual void display(){ /* YOU DO NOT NEED TO IMPLEMENT THIS FUNCTION */ } };class Category: public IndexItem { private: /* fill in the private member variables for the Category class below */ ? int count; public: Category(string name, string code): name(name), code(code){} /* Implement the count function below. Consider the use of the function as depicted in main() */ ? /* Implement the add function which fills the category with contents below. Consider the use of the function as depicted in main() */ ? virtualvoiddisplay(){ /* YOU DO NOT NEED TO IMPLEMENT THIS FUNCTION */ } };arrow_forwardSequence diagram Create a UML sequence diagram that will show your clients how the system’s classes will interact when customers are buying their flight tickets on the booking website. How to create your assignment Review the code responsible for adding a new item. Make a sequence diagram that captures the interactions of objects in the app when a new item is added. Your sequence diagram should contain the following classes: AddItemActivity ItemList Dimensions Item And contain calls of the following methods: onCreate() loadItems() saveItem() Dimensions constructor Item constructor addItem() saveItems() Lastly, the activation of AddItemActivity should start with the call to “onCreate()”arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education