Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is a JSFiddle assignment and must be completed at jsfiddle.net and include

ID: 3577155 • Letter: T

Question

This is a JSFiddle assignment and must be completed at jsfiddle.net and include both the HTML and Java sections

Also common in programming is the use of Caffeine ( https://en.wikipedia.org/wiki/Caffeine )

So you will get to have a little fun with this assignment. You will model a caffeine molecule as a graph and present that computer model. Edges that are single bonds should be presented with a weight of 1, with a double bond - they should have a weight of 2.

Build your model as a Graph. The graph should be able to print all of its Nodes with each adjacent node. You can have a print button or simply call it when the Graph is built.

Output:

H (C) <- there will be 9 of these

C (N,H) <- there will be 3 of these

N (C, C, C) <- there are 3 of these

N (C, C) <- only one of these

etc....

etc...

for each element and combination of connected element

Explanation / Answer

javascript:

function scoped() {
var $parent = $("#fullContent");
$("div", $parent);
}

function find() {
var $parent = $("#fullContent");
$parent.find("div");
}

function childrenMethod() {
var $parent = $("#fullContent");
$parent.children("div");
}

function childrenSelector() {
$("#fullContent > div");
}
function childrenFilter() {
$("#fullContent div");
}

JSLitmus.test('$(.., parent)', scoped);
JSLitmus.test('parent.find(..)', find);
JSLitmus.test('parent.children(..)', childrenMethod);
JSLitmus.test('$("parent > children")', childrenSelector);
JSLitmus.test('$("parent children")', childrenFilter);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote