This document describes the prototype design pattern and provides an example implementation. The key points are:
- The prototype pattern is used to avoid creating multiple objects of the same type by copying (cloning) an existing object instead of creating a new instance.
- An example BookShop class is implemented to store Book objects. Deep cloning is achieved by overriding the clone() method to create a new BookShop instance and copy each Book object rather than just copying the reference.
- This allows modifying one BookShop instance without affecting the other, demonstrating the prototype pattern's ability to create objects independently while sharing initial state.
Nessa apresentação demonstro como arquitetar uma aplicação Android utilizando MVVM+Clean Architecture no Android utilizando as bibliotecas do Jetpack (View Model, Room, LiveData, ...)
Nessa apresentação demonstro como arquitetar uma aplicação Android utilizando MVVM+Clean Architecture no Android utilizando as bibliotecas do Jetpack (View Model, Room, LiveData, ...)
Firebase for Apple Developers - SwiftHeroesPeter Friese
In this talk, we are going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Storing images and other large files in Cloud Storage
- Using Firebase in WidgetKit and on watchOS
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so we will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
Building .NET-based Applications with C#Umar Farooq
9. Building .NET-based Applications with C#
1. Examining Microsoft .NET Framework class library
2. The Object Browser
3. Overriding Methods from System.Object class
4. Formatting Strings, Numbers, Currency and date values.
5. Using Streams and Files: Read and Write both Binary and Text Files, Using FileStream
6. Serialization and De-serialization.
1. Examining Microsoft .NET Framework class library
2. The Object Browser
3. Overriding Methods from System.Object class
4. Formatting Strings, Numbers, Currency and date values.
5. Using Streams and Files: Read and Write both Binary and Text Files, Using FileStream
6. Serialization and De-serialization.
813 LAB Library book sorting Note that only maincpp can .pdfsastaindin
8.13 LAB: Library book sorting
*Note that only main.cpp can be edited as everything else is complete, the other files are
just for context
Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary class)
and the other implemented using the built-in Vector class (VectorLibrary class). Each list contains
100 books (title, ISBN number, author), sorted in ascending order by ISBN number.
Complete main() by inserting a new book into each list using the respective LinkedListLibrary
and VectorLibrary InsertSorted() functions and outputting the number of book copy operations
the computer must perform to insert the new book. Each InsertSorted() returns the number of book
copy operations the computer performs.
Ex: If the input is:
the output is:
MAIN.CPP
#include "LinkedListLibrary.h"
#include "VectorLibrary.h"
#include "BookNode.h"
#include "Book.h"
#include <fstream>
#include <iostream>
using namespace std;
void FillLibraries(LinkedListLibrary &linkedListLibrary, VectorLibrary &vectorLibrary) {
ifstream inputFS; // File input stream
int linkedListOperations = 0;
int vectorOperations = 0;
BookNode* currNode;
Book tempBook;
string bookTitle;
string bookAuthor;
long long bookISBN;
// Try to open file
inputFS.open("books.txt");
while(getline(inputFS, bookTitle)) {
inputFS >> bookISBN;
inputFS.ignore(1, 'n');
getline(inputFS, bookAuthor);
// Insert into linked list
currNode = new BookNode(bookTitle, bookAuthor, bookISBN);
linkedListOperations = linkedListLibrary.InsertSorted(currNode, linkedListOperations);
// Insert into vector
tempBook = Book(bookTitle, bookAuthor, bookISBN);
vectorOperations = vectorLibrary.InsertSorted(tempBook, vectorOperations);
}
inputFS.close(); // close() may throw ios_base::failure if fails
}
int main () {
int linkedListOperations = 0;
int vectorOperations = 0;
// Create libraries
LinkedListLibrary linkedListLibrary = LinkedListLibrary();
VectorLibrary vectorLibrary;
// Fill libraries with 100 books
FillLibraries(linkedListLibrary, vectorLibrary);
// Create new book to insert into libraries
BookNode* currNode;
Book tempBook;
string bookTitle;
string bookAuthor;
long bookISBN;
getline(cin, bookTitle);
cin >> bookISBN;
cin.ignore();
getline(cin, bookAuthor);
// Insert into linked list
// No need to delete currNode, deleted by LinkedListLibrary destructor
currNode = new BookNode(bookTitle, bookAuthor, bookISBN);
// TODO: Call LL_Library's InsertSorted() method to insert currNode and return
// the number of operations performed
// Insert into VectorList
tempBook = Book(bookTitle, bookAuthor, bookISBN);
// TODO: Call VectorLibrary's InsertSorted() method to insert tempBook and return
// the number of operations performed
// TODO: Print number of operations for linked list
// TODO: Print number of operations for vector
}
LinkedListLibrary.h
#ifndef LINKEDLISTLIBRARYH
#define LINKEDLISTLIBRARYH
#include "BookNode.h"
using namespace std;
class LinkedListLibrary {
public:
//Linked list node
BookNode* headN.
In this talk, I am going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Using Combine to fetch data from remote APIs and Firebase
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so I will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
Firebase for Apple Developers - SwiftHeroesPeter Friese
In this talk, we are going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Storing images and other large files in Cloud Storage
- Using Firebase in WidgetKit and on watchOS
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so we will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
Building .NET-based Applications with C#Umar Farooq
9. Building .NET-based Applications with C#
1. Examining Microsoft .NET Framework class library
2. The Object Browser
3. Overriding Methods from System.Object class
4. Formatting Strings, Numbers, Currency and date values.
5. Using Streams and Files: Read and Write both Binary and Text Files, Using FileStream
6. Serialization and De-serialization.
1. Examining Microsoft .NET Framework class library
2. The Object Browser
3. Overriding Methods from System.Object class
4. Formatting Strings, Numbers, Currency and date values.
5. Using Streams and Files: Read and Write both Binary and Text Files, Using FileStream
6. Serialization and De-serialization.
813 LAB Library book sorting Note that only maincpp can .pdfsastaindin
8.13 LAB: Library book sorting
*Note that only main.cpp can be edited as everything else is complete, the other files are
just for context
Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary class)
and the other implemented using the built-in Vector class (VectorLibrary class). Each list contains
100 books (title, ISBN number, author), sorted in ascending order by ISBN number.
Complete main() by inserting a new book into each list using the respective LinkedListLibrary
and VectorLibrary InsertSorted() functions and outputting the number of book copy operations
the computer must perform to insert the new book. Each InsertSorted() returns the number of book
copy operations the computer performs.
Ex: If the input is:
the output is:
MAIN.CPP
#include "LinkedListLibrary.h"
#include "VectorLibrary.h"
#include "BookNode.h"
#include "Book.h"
#include <fstream>
#include <iostream>
using namespace std;
void FillLibraries(LinkedListLibrary &linkedListLibrary, VectorLibrary &vectorLibrary) {
ifstream inputFS; // File input stream
int linkedListOperations = 0;
int vectorOperations = 0;
BookNode* currNode;
Book tempBook;
string bookTitle;
string bookAuthor;
long long bookISBN;
// Try to open file
inputFS.open("books.txt");
while(getline(inputFS, bookTitle)) {
inputFS >> bookISBN;
inputFS.ignore(1, 'n');
getline(inputFS, bookAuthor);
// Insert into linked list
currNode = new BookNode(bookTitle, bookAuthor, bookISBN);
linkedListOperations = linkedListLibrary.InsertSorted(currNode, linkedListOperations);
// Insert into vector
tempBook = Book(bookTitle, bookAuthor, bookISBN);
vectorOperations = vectorLibrary.InsertSorted(tempBook, vectorOperations);
}
inputFS.close(); // close() may throw ios_base::failure if fails
}
int main () {
int linkedListOperations = 0;
int vectorOperations = 0;
// Create libraries
LinkedListLibrary linkedListLibrary = LinkedListLibrary();
VectorLibrary vectorLibrary;
// Fill libraries with 100 books
FillLibraries(linkedListLibrary, vectorLibrary);
// Create new book to insert into libraries
BookNode* currNode;
Book tempBook;
string bookTitle;
string bookAuthor;
long bookISBN;
getline(cin, bookTitle);
cin >> bookISBN;
cin.ignore();
getline(cin, bookAuthor);
// Insert into linked list
// No need to delete currNode, deleted by LinkedListLibrary destructor
currNode = new BookNode(bookTitle, bookAuthor, bookISBN);
// TODO: Call LL_Library's InsertSorted() method to insert currNode and return
// the number of operations performed
// Insert into VectorList
tempBook = Book(bookTitle, bookAuthor, bookISBN);
// TODO: Call VectorLibrary's InsertSorted() method to insert tempBook and return
// the number of operations performed
// TODO: Print number of operations for linked list
// TODO: Print number of operations for vector
}
LinkedListLibrary.h
#ifndef LINKEDLISTLIBRARYH
#define LINKEDLISTLIBRARYH
#include "BookNode.h"
using namespace std;
class LinkedListLibrary {
public:
//Linked list node
BookNode* headN.
In this talk, I am going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Using Combine to fetch data from remote APIs and Firebase
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so I will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
2. • It is a type of Creational Design Pattern.
• It is used when you want to avoid multiple
object creation of same instance, instead you
copy the object to new object and then we can
modify.
• Object which we are copying should provide
copying feature by implementing cloneable
interface.
• We can override clone() method to implement
as per our need.
3. Let us create first demo.java with main function.
package com.prototype;
public class Demo {
public static void main(String[] args){
}
}
4. Now let us create the Book class where the book id and book name will be printed.
package com.prototype;
public class Book
{
private int bid;
private String bname;
public int getBid() {
return bid;
}
public void setBid(int bid) {
this.bid = bid;
}
public String getBname() {
return bname;
}
public void setBname(String bname) {
this.bname = bname;
}
@Override
public String toString() {
return "Book [bid=" + bid + ", bname=" + bname + "]";
}
}
5. Now let us consider all the Books will be stored in one BookShop, hence we are going to create a BookShop class.
package com.prototype;
import java.util.ArrayList;
import java.util.List;
public class BookShop
{
private String shopName;
List<Book> books = new ArrayList<>();
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
@Override
public String toString() {
return "BookShop [shopName=" + shopName + ", books=" + books + "]";
}
}
6. Now let us go to demo.java again.
package com.prototype;
public class Demo {
public static void main(String[] args){
BookShop bs = new BookShop(); //try to create object bs
System.out.println(bs); // print will return null values
}
}
Will return an output like this because we have not specified any values in BookShop.
So create a method in BookShop which will add data to the BookShop.
7. So let us come in BookShop again.
package com.prototype;
import java.util.ArrayList;
import java.util.List;
public class BookShop
{
private String shopName;
List<Book> books = new ArrayList<>();
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
public void loadData(){
for(int i=1; i<=10; i++){
Book b = new Book();
b.setBid(i);
b.setBname("Books "+i);
getBooks().add(b);
}
}
@Override
public String toString() {
return "BookShop [shopName=" + shopName + ", books=" + books + "]";
}
}
8. Then go to Demo again and add bookname and try to load the data from the DB.
package com.prototype;
public class Demo {
public static void main(String[] args){
BookShop bs = new BookShop(); //try to create object bs
bs.setShopName("Shop1");
bs.loadData();
System.out.println(bs);
}
}
Will return an output like this after loading the data from BookShop. (ShopName is modified…)
Up to this, there is no Prototype Design Pattern.
9. So lets do the following in Demo.java again...
package com.prototype;
public class Demo {
public static void main(String[] args){
BookShop bs = new BookShop(); //try to create object bs
bs.setShopName("Shop1");
bs.loadData();
System.out.println(bs);
BookShop bs1 = new BookShop(); //try to create object bs
bs1.setShopName("Shop2");
bs1.loadData();
System.out.println(bs1);
}
}
10. • So the second object is loading the same data from the database again.
• But if it is required to create different object to access the same data then second
object also can try to copy or clone the same from the first object.
• That is the concept of Protype Design Method.
11. So lets do the following in Demo.java again...
package com.prototype;
public class Demo {
public static void main(String[] args){
BookShop bs = new BookShop(); //try to create object bs
bs.setShopName("Shop1");
bs.loadData();
System.out.println(bs);
BookShop bs1 = bs.clone(); //instead of creating new object create clone
bs1.setShopName("Shop2");
bs1.loadData();
System.out.println(bs1);
}
}
‘Clone’ method is in the object class. However as it is protected there so to use that it requires to set the permission.
12. So let us come in BookShop again.
package com.prototype;
import java.util.ArrayList;
import java.util.List;
public class BookShop implements Cloneable
{
private String shopName;
List<Book> books = new ArrayList<>();
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
public void loadData(){
for(int i=1; i<=10; i++){
Book b = new Book();
b.setBid(i);
b.setBname("Books "+i);
getBooks().add(b);
}
}
@Override
public String toString() {
return "BookShop [shopName=" + shopName + ", books=" + books + "]";
}
///////////////////////////////////////////////////////////////////////////////// next slide
}
13. • //to achieve cloning we have to override a clone method
@Override
protected Object clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
return super.clone();
}
And in Demo.java the following:
BookShop bs1 = (BookShop) bs.clone();
And
public static void main(String[] args) throws CloneNotSupportedException
14. Just like...
package com.prototype;
public class Demo {
public static void main(String[] args) throws CloneNotSupportedException
{
BookShop bs = new BookShop();
bs.setShopName("Shop1");
bs.loadData();
System.out.println(bs);
BookShop bs1 = (BookShop)bs.clone();
bs1.setShopName("Shop2");
System.out.println(bs1);
}
}
15. But one problem...
package com.prototype;
public class Demo {
public static void main(String[] args) throws CloneNotSupportedException
{
BookShop bs = new BookShop();
bs.setShopName("Shop1");
bs.loadData();
bs.getBooks().remove(2);
System.out.println(bs);
BookShop bs1 = (BookShop)bs.clone();
bs1.setShopName("Shop2");
System.out.println(bs1);
}
}
16. • So results deleting from both bs and bs1.
• Instead of creating two separate object, by cloning we are getting two references
of a single object.
• Thus this kind of cloning is not creating too much impact.
• So how to achieve ‘Deep Cloning’…
• Go to ‘BookShop.java’ and do the following…
17. So let us come in BookShop again.
package com.prototype;
import java.util.ArrayList;
import java.util.List;
public class BookShop implements Cloneable
{
private String shopName;
List<Book> books = new ArrayList<>();
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
public void loadData(){
for(int i=1; i<=10; i++){
Book b = new Book();
b.setBid(i);
b.setBname("Books "+i);
getBooks().add(b);
}
}
@Override
public String toString() {
return "BookShop [shopName=" + shopName + ", books=" + books + "]";
}
///////////////////////////////////////////////////////////////////////////////// next slide
}
18. @Override
protected BookShop clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
return super.clone();
}
// And in Demo.java, in case of deepcloning in Bookshop, when you are returning bookshop
and not using object then you dont need to cast bookshop :
BookShop bs1 = bs.clone();
And remove the return super.clone() also, like the following:
protected BookShop clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
//return super.clone();
BookShop shop = new BookShop();
for(Book b : this.getBooks()) // Don’t put these three rows first and with return only
{ // no data will be shown in output for the second object as nothing is returned
shop.getBooks().add(b);
}
return shop;
}
19. Now finally go to Demo.java and complete it...
package com.prototype;
public class Demo {
public static void main(String[] args) throws CloneNotSupportedException
{
BookShop bs = new BookShop();
bs.setShopName("Shop1");
bs.loadData();
BookShop bs1 = bs.clone();
bs.getBooks().remove(2);
bs1.setShopName("Shop2");
System.out.println(bs);
System.out.println(bs1);
}
}