#include <iostream>
#include <string>
using namespace std;
class Book {
private:
string title;
string author;
double price;
public:
// Constructor
Book(string t, string a, double p) {
title = t;
author = a;
price = p;
}
// Method to set price
void setPrice(double p) {
price = p;
}
// Method to get price
double getPrice() {
return price;
}
// Method to show book details
void showDetails() {
cout << "Title: " << title << endl;
cout << "Author: " << author << endl;
cout << "Price: $" << price << endl;
}
};
int main() {
Book b1("Object-Oriented Programming", "John Smith", 45.99);
[Link]();
[Link](50.00);
cout << "\nUpdated Price: $" << [Link]() << endl;
return 0;
}