-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path16_VideoStore.java
More file actions
173 lines (135 loc) · 3.31 KB
/
Copy path16_VideoStore.java
File metadata and controls
173 lines (135 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<<<<<<< HEAD
package lesson16;
/* 1. Ñîçäàòü êëàññ ÂÈÄÅÎÌÀÃÀÇÈÍ ñî ñëåäóþùèìè ïîëÿìè:
Íàçâàíèå ôèëüìà tittle
Ðåæèññåð producer
Æàíð genre
Ðåéòèíã ïîïóëÿðíîñòè rating
Öåíà äèñêà price
Ðåàëèçîâàòü ñëåäóþùèå âîçìîæíîñòè:
Ïîèñê ïî íàçâàíèþ
Ïîèñê ïî æàíðó
Ïîèñê ïî ðåæèññåðó
Ñàìûé ïîïóëÿðíûé ôèëüì â æàíðå
Ïîêàç âñåõ çàïèñåé è äîáàâëåíèå
*
*/
public class VideoStore {
// ïîëÿ
private String tittle;
private String producer;
private String genre;
private int rating;
private double price;
// êîíñòðóêòîð
public VideoStore (String tittle, String producer, String genre, int rating, double price) {
this.setTittle(tittle);
this.setProducer(producer);
this.setGenre(genre);
this.setRating(rating);
this.setPrice(price);
}
// Ãåòòåðû-Ñåòòåðû
public String getTittle() {
return tittle;
}
public void setTittle(String tittle) {
this.tittle = tittle;
}
public String getProducer() {
return producer;
}
public void setProducer(String producer) {
this.producer = producer;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getRating() {
return rating;
}
public void setRating(int rating) {
this.rating = rating;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return this.getTittle() + "\t" + this.getProducer() + "\t" + this.getGenre() + "\t" + this.getRating() + "\t" + this.getPrice();
}
}
=======
package lesson16;
/* 1. Создать клаÑÑ Ð’Ð˜Ð”Ð•ÐžÐœÐГÐЗИРÑо Ñледующими полÑми:
Ðазвание фильма tittle
РежиÑÑер producer
Жанр genre
Рейтинг популÑрноÑти rating
Цена диÑка price
Реализовать Ñледующие возможноÑти:
ПоиÑк по названию
ПоиÑк по жанру
ПоиÑк по режиÑÑеру
Самый популÑрный фильм в жанре
Показ вÑех запиÑей и добавление
*
*/
public class VideoStore {
// полÑ
private String tittle;
private String producer;
private String genre;
private int rating;
private double price;
// конÑтруктор
public VideoStore (String tittle, String producer, String genre, int rating, double price) {
this.setTittle(tittle);
this.setProducer(producer);
this.setGenre(genre);
this.setRating(rating);
this.setPrice(price);
}
// Геттеры-Сеттеры
public String getTittle() {
return tittle;
}
public void setTittle(String tittle) {
this.tittle = tittle;
}
public String getProducer() {
return producer;
}
public void setProducer(String producer) {
this.producer = producer;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getRating() {
return rating;
}
public void setRating(int rating) {
this.rating = rating;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return this.getTittle() + "\t" + this.getProducer() + "\t" + this.getGenre() + "\t" + this.getRating() + "\t" + this.getPrice();
}
}
>>>>>>> c0ad407ecd83aa6bee2290b638c63333c0e9ee07