-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completed adding tabs to the java version of the lists.
- Loading branch information
Showing
7 changed files
with
396 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,59 @@ <h3>Inside our Main</h3> | |
positive integer), and the remaining two parameters are your BRIDGES | ||
credentials. You will need to replace the two fields in this call | ||
with your own BRIDGES credentials. <p> | ||
<li>Now create an array to hold Student objects.</li> | ||
<pre class="prettyprint"> | ||
Student[] students = { | ||
new Student( | ||
"00000000000", | ||
"Gretel Chaney", | ||
"CS", | ||
"[email protected]", | ||
"magenta", | ||
"blue", | ||
9.0, | ||
"https://randomuser.me/api/portraits/med/women/45.jpg" | ||
), | ||
new Student( | ||
"00000000001", | ||
"Karol Soderman", | ||
"SIS", | ||
"[email protected]", | ||
"magenta", | ||
"red", | ||
11.0, | ||
"https://randomuser.me/api/portraits/med/women/46.jpg" | ||
), | ||
new Student( | ||
"00000000002", | ||
"Lamont Kyler", | ||
"BIO", | ||
"[email protected]", | ||
"yellow", | ||
"green", | ||
12.0, | ||
"https://randomuser.me/api/portraits/med/men/80.jpg" | ||
), | ||
new Student( | ||
"00000000003", | ||
"Gladys Serino", | ||
"CS","[email protected]", | ||
"blue", | ||
"magenta", | ||
9.0, | ||
"https://randomuser.me/api/portraits/med/women/2.jpg" | ||
), | ||
new Student("00000000004", | ||
"Starr Mcginn", | ||
"CS", | ||
"[email protected]", | ||
"red", | ||
"yellow", | ||
15.0, | ||
"https://randomuser.me/api/portraits/med/men/87.jpg") | ||
}; | ||
</pre> | ||
|
||
<li>Then we can create our CircDLelements with the Student objects and link the DLements together.</li> | ||
<pre class="prettyprint"> | ||
|
||
|
@@ -34,11 +87,11 @@ <h3>Inside our Main</h3> | |
*/ | ||
//initializing all elements with empty labels, and with the student data. See Object model.Student.java | ||
CircDLelement<Student> el0 = null; | ||
for(int i = 0; i < StudentProvider.getStudents().length; i++) { | ||
for(int i = 0; i < students.length; i++) { | ||
if(i > 0) { | ||
el0 = insertFront(el0, new CircDLelement("",StudentProvider.getStudentAt(i))); | ||
el0 = insertFront(el0, new CircDLelement("",students[i])); | ||
}else{ | ||
el0 = new CircDLelement("",StudentProvider.getStudentAt(i)); | ||
el0 = new CircDLelement("",students[i]); | ||
} | ||
} | ||
|
||
|
@@ -74,7 +127,6 @@ <h3>Here's the final code:</h3> | |
<ul class="nav nav-tabs"> | ||
<li class="active"><a href="#tab1" data-toggle="tab">Main.java</a></li> | ||
<li><a href="#tab2" data-toggle="tab">Student.java</a></li> | ||
<li><a href="#tab3" data-toggle="tab">StudentProvider.java</a></li> | ||
</ul> | ||
</div> | ||
<div class="panel-body"> | ||
|
@@ -86,10 +138,6 @@ <h3>Here's the final code:</h3> | |
<div class="tab-pane fade" id="tab2"> | ||
<pre w3-include-html="tutorial-source-code/Student.java" class="prettyprint"></pre> | ||
</div> | ||
|
||
<div class="tab-pane fade" id="tab3"> | ||
<pre w3-include-html="tutorial-source-code/StudentProvider.java" class="prettyprint"></pre> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
Oops, something went wrong.