summary refs log tree commit diff stats
path: root/java/text/ComplexCalculations.typ
diff options
context:
space:
mode:
authorSudipto Mallick <smlckz@termux-alpine>2024-01-27 11:33:43 +0000
committerSudipto Mallick <smlckz@termux-alpine>2024-01-27 11:34:11 +0000
commitcd6a9243c056710794549a1ab5d51fbdd082ce2e (patch)
treef3f4df42bcfa96b9d6ef48da2b33be148adfdd2b /java/text/ComplexCalculations.typ
parent1db2841d10c6920eba89f1e55eb3c90aa770ad07 (diff)
downloadzadania-cd6a9243c056710794549a1ab5d51fbdd082ce2e.tar.gz
Complete Java assignments #7-13
Diffstat (limited to 'java/text/ComplexCalculations.typ')
-rw-r--r--java/text/ComplexCalculations.typ15
1 files changed, 8 insertions, 7 deletions
diff --git a/java/text/ComplexCalculations.typ b/java/text/ComplexCalculations.typ
index b8df211..ffa9304 100644
--- a/java/text/ComplexCalculations.typ
+++ b/java/text/ComplexCalculations.typ
@@ -1,9 +1,9 @@
 #import "/template.typ": *
 #show: A => apply(A)
 #set raw(lang: "java-new")
-#set par(leading: 0.5em)
+#set par(leading: 0.65em)
 
-#assignment(6)[
+#assignment(7)[
   Write a program to add two complex numbers using concept of methods returning objects and methods taking objects as parameters.
 ]
 
@@ -23,9 +23,10 @@
 - The `Complex` class objects represents a a complex number.
   - Constructor `Complex(double, double)`: Create a complex number object from the provided real and imaginary parts.
   - `public String toString()` method returns the string representation of the complex number.
-- The `ComplexOperations` class 
-- The `CylinderCalculationsCLI` orchestrates a main program with:
-  - `public static void main(String[])`: Creates a cylinder object with its radius and height given as command-line arguments.
-- The `CylinderCalculationsScan` orchestrates a main program with:
-  - `public static void main(String[])`: Creates a cylinder object with its radius and height taken from user using `java.util.Scanner`.
+- The `ComplexOperations` class contains operations that can be performed on `Complex` objects.
+  - `static Complex add(Complex a, Complex b) `: Returns the sum of two complex numbers provided.
+- The `ComplexCalculations` orchestrates a main program with:
+  - `static Complex takeComplexInput()`: Returns the complex number provided by the user.
+  - `public static void main(String[])`: Performs addition of two complex numbers.
+
 #signature()