summaryrefslogtreecommitdiff
path: root/oop
diff options
context:
space:
mode:
Diffstat (limited to 'oop')
-rw-r--r--oop/10-point-of-sale/.vscode/settings.json7
-rw-r--r--oop/10-point-of-sale/README.md18
-rw-r--r--oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/Item.java34
3 files changed, 59 insertions, 0 deletions
diff --git a/oop/10-point-of-sale/.vscode/settings.json b/oop/10-point-of-sale/.vscode/settings.json
new file mode 100644
index 0000000..0ac215c
--- /dev/null
+++ b/oop/10-point-of-sale/.vscode/settings.json
@@ -0,0 +1,7 @@
+{
+ "java.project.sourcePaths": ["src"],
+ "java.project.outputPath": "bin",
+ "java.project.referencedLibraries": [
+ "lib/**/*.jar"
+ ]
+}
diff --git a/oop/10-point-of-sale/README.md b/oop/10-point-of-sale/README.md
new file mode 100644
index 0000000..a43b9f6
--- /dev/null
+++ b/oop/10-point-of-sale/README.md
@@ -0,0 +1,18 @@
+## Getting Started
+
+Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
+
+## Folder Structure
+
+The workspace contains two folders by default, where:
+
+- `src`: the folder to maintain sources
+- `lib`: the folder to maintain dependencies
+
+Meanwhile, the compiled output files will be generated in the `bin` folder by default.
+
+> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
+
+## Dependency Management
+
+The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
diff --git a/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/Item.java b/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/Item.java
new file mode 100644
index 0000000..08567c7
--- /dev/null
+++ b/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/Item.java
@@ -0,0 +1,34 @@
+package lk.ac.pdn.ceit.pos;
+
+public class Item {
+ private String name;
+ private String id;
+ private double unitPrice;
+
+ public Item(String name, String id, double unitPrice) {
+ this.name = name;
+ this.id = id;
+ this.unitPrice = unitPrice;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public double getUnitPrice() {
+ return unitPrice;
+ }
+ public void setUnitPrice(double unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+
+}