-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9ffc43
commit 71a8aa4
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import java.util.*; | ||
|
||
public class Hotal { | ||
int Tea = 10; | ||
int Coffee = 20; | ||
int vada = 6; | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Welcome to Hotal"); | ||
System.out.println("Actual Price: "); | ||
|
||
Hotal server = new Hotal(); | ||
|
||
System.out.println("Tea: " + server.Tea); | ||
System.out.println("Coffee: " + server.Coffee); | ||
System.out.println("Vada: " + server.vada); | ||
|
||
//Hotal One | ||
System.out.println("Hotal1 Price"); | ||
|
||
Hotal server1 = new Hotal(); | ||
|
||
Scanner sc = new Scanner(System.in); | ||
System.out.println("Enter Tea Price: "); | ||
server1.Tea = sc.nextInt(); | ||
System.out.println("Tea: " + server1.Tea); | ||
|
||
//Hotal Two | ||
System.out.println("Hotal2 Price"); | ||
|
||
Hotal server2 = new Hotal(); | ||
|
||
System.out.println("Enter Coffee Price: "); | ||
server2.Coffee = sc.nextInt(); | ||
System.out.println("Coffee: " + server2.Coffee); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
public class Laptop { | ||
String brandname = ""; | ||
String Processor = ""; | ||
String Ram = ""; | ||
int price = 0; | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Welcome to Laptop Store"); | ||
System.out.println("*************************"); | ||
System.out.println("Laptop1 Price"); | ||
System.out.println("*************************"); | ||
|
||
Laptop server = new Laptop(); | ||
|
||
server.brandname = "Dell"; | ||
server.Processor = "i5"; | ||
server.Ram = "8GB"; | ||
server.price = 50000; | ||
|
||
System.out.println("Brand Name: " + server.brandname); | ||
System.out.println("Processor: " + server.Processor); | ||
System.out.println("Ram: " + server.Ram); | ||
System.out.println("Price: " + server.price); | ||
|
||
//Laptop One | ||
System.out.println("*************************"); | ||
System.out.println("Laptop2 Price"); | ||
System.out.println("*************************"); | ||
|
||
Laptop server1 = new Laptop(); | ||
|
||
server1.brandname = "HP"; | ||
server1.Processor = "i3"; | ||
server1.Ram = "4GB"; | ||
server1.price = 30000; | ||
|
||
System.out.println("Brand Name: " + server1.brandname); | ||
System.out.println("Processor: " + server1.Processor); | ||
System.out.println("Ram: " + server1.Ram); | ||
System.out.println("Price: " + server1.price); | ||
|
||
//Laptop Two | ||
System.out.println("*************************"); | ||
System.out.println("Laptop3 Price"); | ||
System.out.println("*************************"); | ||
|
||
Laptop server2 = new Laptop(); | ||
|
||
server2.brandname = "Lenovo"; | ||
server2.Processor = "i7"; | ||
server2.Ram = "16GB"; | ||
server2.price = 70000; | ||
|
||
System.out.println("Brand Name: " + server2.brandname); | ||
System.out.println("Processor: " + server2.Processor); | ||
System.out.println("Ram: " + server2.Ram); | ||
System.out.println("Price: " + server2.price); | ||
} | ||
} |