Move files from HW03 to root directory
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
# Compiled
|
||||||
|
*.class
|
||||||
|
target/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.example</groupId>
|
||||||
|
<artifactId>WS-04-oop-review</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package org.example;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Welcome to Movie App!");
|
||||||
|
Movie movie = new Movie("Inception", "Christopher Nolan", 2010, 8.8);
|
||||||
|
System.out.println(movie.getTitle());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package org.example;
|
||||||
|
|
||||||
|
public class Movie {
|
||||||
|
private String title;
|
||||||
|
private String director;
|
||||||
|
private int year;
|
||||||
|
private double rating;
|
||||||
|
private String[] images; // باگ: باید List<String> باشه
|
||||||
|
|
||||||
|
public Movie(String title, String director, int year, double rating) {
|
||||||
|
this.title = title;
|
||||||
|
this.director = director;
|
||||||
|
this.year = year;
|
||||||
|
this.rating = rating;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Getters and Setters
|
||||||
|
public String getTitle() { return title; }
|
||||||
|
public void setTitle(String title) { this.title = title; }
|
||||||
|
public String getDirector() { return director; }
|
||||||
|
public void setDirector(String director) { this.director = director; }
|
||||||
|
public int getYear() { return year; }
|
||||||
|
public void setYear(int year) { this.year = year; }
|
||||||
|
public double getRating() { return rating; }
|
||||||
|
public void setRating(double rating) { this.rating = rating; }
|
||||||
|
public String[] getImages() { return images; }
|
||||||
|
public void setImages(String[] images) { this.images = images; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user