Ask a Question | Answer a Question! |

Submitting your question...
ResFinder - Thousands of Practice Papers
Plz point out my mistake in the prog.:
import java.io.*;
class FruitJuice
{
int product_code,pack_size,product_price;
String flavour,pac_type;
FruitJuice()
{
product_code=0;
pack_size=0;
product_price=0;
flavour="";
pac_type="";
}
void input()throws IOException
{
BufferedReader inp=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter pcode psize pprice flavour pactype");
product_code=Integer.parseInt(inp.readLine());
pack_size=Integer.parseInt(inp.readLine());
product_price=Integer.parseInt(inp.readLine());
flavour=inp.readLine();
pac_type=inp.readLine();
}
void discount()
{
product_price=product_price-10;
}
void display()
{
System.out.println("P code="+product_code);
System.out.println("P size="+pack_size);
System.out.println("P price="+product_price);
System.out.println("Flavour="+flavour);
System.out.println("P type="+pac_type);
}
public static void main(String args[])
{
FruitJuice ob=new FruitJuice();
ob.input();
ob.discount();
ob.display();
}
} |
 |
| asked by Aavesh Kumar (aavesh) 9 years ago |
1 |
Other Questions on This Topic
What is the capital of Manipur? |
 |
| asked by Yogesh (yogesh) 1 year ago |
1 |
guys pls suggest some good ways to go watch oppenheimer as it a rated. im 15 yr old and will be going in 15 person group together to watch the amazing movie. i know this is not the space to ask but pls help. Will be very grateful for any help. Yar idhar tak padh liya to kuch to bata hi do |
 |
| asked by Dhruv Shah (maihudhruvvvvvv) 2 years ago |
0 |
Hydrochloric acid turns pink coloured potassium permanganate to which colour? |
 |
| asked by Vivanth (vivanth1420) 7 years ago |
1 |
how to find vegetation of the given toposheet |
 |
| asked by Pavan Sd (pavansd) 8 years ago |
1 |
i got 99% if any 1 wnt any hlp or crash course ..contact 7044922566. without any charges |
 |
| asked by Ankit Kumar (ajjjj58) 8 years ago |
0 |
hi i got 98% in boards
if anyone has any doubts then please f*** off |
 |
| asked by Unknown (unknown2001) 8 years ago |
0 |
How to distinguish between narrative and descriptive |
 |
| asked by Smitha Menon (mythilimenon) 8 years ago |
0 |
I scored 96.2 in boards. Message me if you require any help :) |
 |
| asked by Agrim (alan1) 9 years ago |
2 |
hey i really want to get 95% please help me out what am i supposed to do for my boards!! |
 |
| asked by Riddhi Jain (olive1909) 9 years ago |
|