| 74 | }; |
| 75 | |
| 76 | public class CmplxNumOps { |
| 77 | public static void main(String[] args) { |
| 78 | Scanner sc = new Scanner(System.in); |
| 79 | int choice = 0; |
| 80 | Complex c1 = new Complex(); // Creation of object of class Complex |
| 81 | c1.get_data(); |
| 82 | c1.display(); |
| 83 | System.out.println("Enter 1 for addition, 2 for subtraction, 3 for multiplication, 4 for division: "); |
| 84 | choice = sc.nextInt(); |
| 85 | switch (choice) { |
| 86 | case 1: |
| 87 | c1.add(); |
| 88 | break; |
| 89 | case 2: |
| 90 | c1.sub(); |
| 91 | break; |
| 92 | case 3: |
| 93 | c1.mult(); |
| 94 | break; |
| 95 | case 4: |
| 96 | c1.div(); |
| 97 | break; |
| 98 | default: |
| 99 | System.out.println("Wrong input. Please enter correct choice."); |
| 100 | } |
| 101 | } |
| 102 | } |
nothing calls this directly
no outgoing calls
no test coverage detected