- import java.util.Scanner;
-
- public class Manager {
-
- public static void main(String[] args) {
-
-
- ShowMessag Tushar=new ShowMessag();
-
- TakeInput Tushar1=new TakeInput();
-
- Tushar.BanglaMarks();
- Tushar1.BanglaInput();
-
-
- Tushar.EnglishMarks();
- Tushar1.EnglishInput();
-
-
- Tushar.MathMarks();
- Tushar1.MathMarks();
-
- Tushar1.TotalMarks();
-
- }
-
- }
-
- class ShowMessag {
-
- public void BanglaMarks(){
- System.out.println("Give Bangla Marks");
- }
-
- public void EnglishMarks(){
- System.out.println("Give English Marks");
- }
-
- public void MathMarks(){
- System.out.println("Give Math Marks");
- }
-
-
- }
-
- class TakeInput {
-
- int bengali;
- int english;
- int math;
-
- private static Scanner scanner = new Scanner( System.in );
-
- public TakeInput(){
- this.bengali=0;
- this.english=0;
- this.math=0;
- }
-
- public void BanglaInput(){
- bengali = scanner.nextInt();
- }
-
- public void EnglishInput(){
- english = scanner.nextInt();
- }
-
-
- public void MathMarks(){
- math = scanner.nextInt();
- }
-
- public void TotalMarks(){
- System.out.println("Total="+bengali+english+math);
- }
-
- }
this above code example was incomplete and sent by one of my NCC student and i just solve his problem so that i paste it here.
Comments 2