Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
javaAssessEx1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
elijah vasquez
javaAssessEx1
Commits
b63a1eab
Commit
b63a1eab
authored
Mar 08, 2022
by
Elijah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
1d204e95
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
2 deletions
+7
-2
App.class
bin/App.class
+0
-0
AppTest.class
bin/AppTest.class
+0
-0
Complex.class
bin/Complex.class
+0
-0
App.java
src/App.java
+1
-0
AppTest.java
src/AppTest.java
+1
-0
Complex.java
src/Complex.java
+5
-2
No files found.
bin/App.class
View file @
b63a1eab
No preview for this file type
bin/AppTest.class
View file @
b63a1eab
No preview for this file type
bin/Complex.class
View file @
b63a1eab
No preview for this file type
src/App.java
View file @
b63a1eab
// ignore
public
class
App
{
public
class
App
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
out
.
println
(
"Hello, World!"
);
System
.
out
.
println
(
"Hello, World!"
);
...
...
src/AppTest.java
View file @
b63a1eab
// the "mains"
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
src/Complex.java
View file @
b63a1eab
// work out here
public
class
Complex
{
public
class
Complex
{
public
double
real
;
public
double
real
;
...
@@ -27,13 +28,15 @@ public class Complex {
...
@@ -27,13 +28,15 @@ public class Complex {
return
real
;
return
real
;
}
}
public
double
magnitude
()
public
double
magnitude
()
// magnitude = sqrt(a^2 + b^2)
{
{
Math
.
sqrt
(
Math
.
pow
(
this
.
real
,
2
)
+
Math
.
pow
(
this
.
imag
,
2
));
return
1.0
;
return
1.0
;
}
}
public
double
argument
()
public
double
argument
()
// argument = tan-1(b/a)
{
{
//Math.atan2(b,a);
return
1.0
;
return
1.0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment