-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathFruitjuice.java
More file actions
50 lines (39 loc) · 1.09 KB
/
Fruitjuice.java
File metadata and controls
50 lines (39 loc) · 1.09 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
import java.io.*;
class Fruitjuice
{
int product_code;
String flavour;
String pac_type;
int pack_size;
int product_price;
public Fruitjuice()
{
product_code=0;
flavour=" ";
pac_type=" ";
pack_size=0;
product_price=0;
}
public void input()
{
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader y = new BufferedReader(in);
System.out.println("Input product code");
System.out.println("Input flavour");
System.out.println("Input pack type");
System.out.println("Input pack size");
System.out.println("Input product price");
}
public void discount()
{
product_price=product_price-10;
}
public void display()
{
System.out.println(" product code= "+product_code);
System.out.println("flavour= "+flavour);
System.out.println("pack type= "+pac_type);
System.out.println("pack size= "+pack_size);
System.out.println("product price+ "+product_price);
}
}