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

Goal: Study a representation of a computer network to determine which type of ne

ID: 3836433 • Letter: G

Question

Goal: Study a representation of a computer network to determine which type of network topology exists - bus, ring, or star. Problem: Provide a RESTful service which accepts as a POST of JSON a representation of a network of computers. Assume each connection between computers is bidirectional. Output a JSON message indicating if the topology is a bus (1), a ring (2), or a star (3). If the topology is none of these, then output the type as "irregular". Example input: {"nList":[{" connected":["A", "B"]}, {"connected":["B", "C"]}, {"connected ": ["C", "D"]} {"connected":["D", "E]}]} Example output: {"type" = "bus"} Erroneous input (e.g, malformed JSON) should be handled gracefully. Deliverables: Submit to the Blackboard by the due date: An HTTP URL to a RESTful service which must remain up and running 24/7 until grading is complete Graders will invoke your service with a tool such as curl or Postman at a time of their choosing. A ZIP file containing your source code, written in any language you choose.

Explanation / Answer

import java.util.*;
class btheo
;
static char temperature[]=;
static char humidity[]=;
static char windy[]=;
static char class1[]=;

static double prob[][]=new double[4][2];

static double pp=9.0/14.0;
static double npp=5.0/14.0;

static int flag=0;
static int flag1=0;

static double play_N=1;
static double notplay_N=1;

static void cal_N(int a)

else if(flag==1)

else if(flag==2)

else
if(flag==3)

return prob;
}


static double cal_noplay_prob(char ch)

else if(flag1==1)

else if(flag1==2)

else
if(flag1==3)

return prob;
}
public static void main(String args[])


cal_N(1);
cal_N(2);

double pt=play_N+notplay_N;

double prob_of_play=0;
double prob_of_noplay=0;

prob_of_play=play_N/pt;
prob_of_noplay=notplay_N/pt;

System.out.println(" Probability of play "+prob_of_play);
System.out.println(" Probability of NO play "+prob_of_noplay );

if(prob_of_play>prob_of_noplay)
System.out.println(" The new tuple classified below "PLAY" class.Hence there'll be play!!!");
else
System.out.println(" The new tuple classified below "NO PLAY" class.Hence there'll be NO play.");

}
}

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