-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMouse.h
More file actions
21 lines (15 loc) · 776 Bytes
/
Mouse.h
File metadata and controls
21 lines (15 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Student Bshara Haj, 212590186.
//Student Obaeda Khatib, 201278066.
#pragma once
#include "PeripheralDevice.h"
class Mouse : public PeripheralDevice //Mouse class, which is a subclass of PeripheralDevice
{
int dpi;
public:
Mouse(int price, const std::string& manufacturer, const std::string& color, bool isWireless, int dpi); //Constructor for the Mouse class
int getDpi() const; //to get the DPI
void setDpi(int dpi); //to set the DPI
virtual void connect( Computer& computer) ; //Virtual method to simulate connecting the mouse to a computer
virtual string toString() const; // Virtual method to get a string representation of the mouse
operator string() const; //Overloaded operator to convert the mouse to a string
};