From f11d4f262aafed129142bec3df6f5c02e8f7e042 Mon Sep 17 00:00:00 2001 From: AndrewTrieu Date: Tue, 20 Dec 2022 12:37:15 +0200 Subject: [PATCH] Update README.md --- .gitignore | 1 + README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/Main.java | 4 ++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6f9a44 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/settings.json diff --git a/README.md b/README.md index b31a3c2..3195619 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,51 @@ The `Showtime` class represents a showtime for a movie in a movie theater. It ha The `Venue` class is a simple class that represents a venue such as a theater, stadium, or arena. It has name and location attributes and corresponding get and set methods. It is intended to be used as a base class that other classes such as `Theater` can extend to inherit its attributes and methods. +## Demonstration + +``` +Welcome to the LUT Kino at Yliopistonkatu! +1. Add a movie +2. Remove a movie +3. View a movie +4. View all movies +5. Add a showtime +6. Remove a showtime +7. View a showtime +8. View all showtimes +9. Buy a ticket +10. View seating +0. Exit +Enter your choice: 1 +Enter the movie title: Avatar +Enter the director: James Cameron +Enter the duration: 162 +Movie added successfully! + +Welcome to the LUT Kino at Yliopistonkatu! +1. Add a movie +2. Remove a movie +3. View a movie +4. View all movies +5. Add a showtime +6. Remove a showtime +7. View a showtime +8. View all showtimes +9. Buy a ticket +10. View seating +0. Exit +Enter your choice: 4 + +Title: Avatar +Director: James Cameron +Release Year: 2009-12-15 +Review: In the 22nd century, a paraplegic Marine is dispatched to the moon Pandora on a unique mission, but becomes torn between following orders and protecting an alien civilization. +Genre: [Action, Adventure, Fantasy, Science Fiction] +Duration: 162 +Rating: 7.5 +Number of Ratings: 26995 +``` + ## Object-Oriented Programming Principles The project uses the four principles of object-oriented programming (OOP): diff --git a/src/Main.java b/src/Main.java index f22e9c3..914a008 100644 --- a/src/Main.java +++ b/src/Main.java @@ -15,7 +15,7 @@ import org.json.JSONObject; // Main class public class Main { // attributes - private static final String API_KEY = "1958c3873a1d102fde2cab155cda98bc"; + private static final String API_KEY = "YOUR_API_KEY"; private static Theater theater; static Scanner scanner = new Scanner(System.in); @@ -26,7 +26,7 @@ public class Main { // create a menu for customers of the theater while (true) { - System.out.println("\nWelcome to the " + theater.getName() + "at" + theater.getLocation() + "!"); + System.out.println("\nWelcome to the " + theater.getName() + " at " + theater.getLocation() + "!"); System.out.println("1. Add a movie"); System.out.println("2. Remove a movie"); System.out.println("3. View a movie");