Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Practice with Arrays and Loops
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOFT Core
SOFT 160
Practice with Arrays and Loops
Compare revisions
4b6ecdfb282a415e03bbd5fe4c3d9535469dade7 to main
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
soft-core/soft-160/practice-with-arrays-and-loops
Select target project
No results found
main
Select Git revision
Branches
main
Swap
Target
jwollam3/practice-with-arrays-and-loops
Select target project
jwollam3/practice-with-arrays-and-loops
soft-core/soft-160/practice-with-arrays-and-loops
2 results
4b6ecdfb282a415e03bbd5fe4c3d9535469dade7
Select Git revision
Branches
main
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Added example inputs for problems 2-4
· 5a3e8f87
Christopher Bohn
authored
4 months ago
Verified
5a3e8f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/edu/unl/cse/soft160/Main.java
+6
-2
6 additions, 2 deletions
src/main/java/edu/unl/cse/soft160/Main.java
with
6 additions
and
2 deletions
src/main/java/edu/unl/cse/soft160/Main.java
View file @
5a3e8f87
...
@@ -56,15 +56,19 @@ public class Main {
...
@@ -56,15 +56,19 @@ public class Main {
break
;
break
;
case
2
:
case
2
:
// UNCOMMENT THIS CODE, AND ADD THE CALL TO convertToBoolean
// UNCOMMENT THIS CODE, AND ADD THE CALL TO convertToBoolean
//
int[] values = {3, 4, 5};
int
[]
values
=
{
3
,
4
,
5
};
//
System.out.println(Arrays.toString(values));
System
.
out
.
println
(
Arrays
.
toString
(
values
));
// boolean[] convertedValues = ...
// boolean[] convertedValues = ...
// System.out.println(Arrays.toString(convertedValues));
// System.out.println(Arrays.toString(convertedValues));
// break;
// break;
case
3
:
case
3
:
// WRITE CODE TO CALL YOUR PROBLEM 3 METHOD HERE. BE SURE TO ADD A break STATEMENT AT THE END OF THIS CASE.
// WRITE CODE TO CALL YOUR PROBLEM 3 METHOD HERE. BE SURE TO ADD A break STATEMENT AT THE END OF THIS CASE.
int
width
=
3
;
int
height
=
4
;
case
4
:
case
4
:
// WRITE CODE TO CALL YOUR PROBLEM 4 METHOD HERE. BE SURE TO ADD A break STATEMENT AT THE END OF THIS CASE.
// WRITE CODE TO CALL YOUR PROBLEM 4 METHOD HERE. BE SURE TO ADD A break STATEMENT AT THE END OF THIS CASE.
double
[]
weights
=
{
12.0
,
28.5
,
15.4
,
22.1
};
double
maximumWeight
=
50.0
;
default
:
default
:
System
.
out
.
println
(
"Not ready for problem "
+
choice
);
System
.
out
.
println
(
"Not ready for problem "
+
choice
);
}
}
...
...
This diff is collapsed.
Click to expand it.