How to fix this debugging in java
Problem Debugging
This problem is to assign a value to num2 based on the input value of num1. It should then print both numbers.
int num1 = 0;
int num2 = 0;
System.out.print("Enter a number - 1, 2, or 3: ");
num1 = keyboard.nextInt();
if (num1 == 1);
num2 = 2;
else if (num1 == 2);
num2 = 3;
else if (num1 == 3);
num2 = 4;
System.out.println("num1 = " + num1 // + " and num2 = " + num2);
System.out.println("\n");
In: Computer Science
In: Computer Science
Create your own function in C that accepts one input number and returns a double number. The themes for the functions should be one of the following:
Divides the number by 3 and returns the result. For example, if 6 was input then 2.0 should be returned.
provide both your C code and an example call to the C code function. Be sure to provide an overview of what your function is doing. Include header documentation in the code as well as internal code documentation.
In: Computer Science
Question 1:
The Ethernet frame format has remained unchanged since the first standard; however, the cables and the wiring scheme have changed dramatically.
A: True
B: False
Question 2:
The concept of a ___________ is allow a switch to be configured to emulate multiple, independent switches.
A. VLAN switch
B. Repeater
C. Modem
D. Bridge
Question 3:
A Virtual Local Area Network (VLAN) switch allows the switch to be reconfigured to emulate multiple, independent switches.
A. True
B. False
Question 4:
The IEEE 802.1Q standard allows
A. connections to multiple bridging devices on multiple LAN segments.
B. multiple VLAN switches to be interconnected and to operate like a giant VLAN switch.
C. a single switch to emulate multiple, independent switches.
D. switches to connect to a virtual WAN router.
Question 5:
The purpose of a Distributed Spanning Tree (DST) is to
A. include additional LAN segments on a network.
B. increase distances a message can be forwarded.
C. prevent broadcast messages from flowing in an endless loop.
D. associate a wireless host with an access point.
In: Computer Science
In: Computer Science
Consider the following database schema for a BOOKSTORE database:
The Books relation stores information about books sold by the bookstore. Note that bookid is the primary key. An example tuple is as follows:
(105, 'JAVA PROGRAMMING', 'JOHN DOE', 2001)
The Customers relation stores information about the customers of the bookstore. Note that customerid is the primary key. An example tuple is as follows:
(210, 'JOHN SMITH', '[email protected]')
The Purchases relation stores information about the customer purchases of books. Note that customerid and bookid form the primary key. An example tuple is as follows:
(210, 105, 2002), indicating that 'JOHN SMITH' with customerid 210 purchased the 'JAVA PROGRAMMING' book with bookid 105 in the year 2002.
The Reviews relation stores information about the customer reviews/ratings of the books. The ratings field refers to the number of "stars" given to the book. Note that customerid and bookid form the primary key. An example tuple is as follows:
(210, 105, 3), indicating that 'JOHN SMITH' with customerid 210 gave a 3-star rating to the 'JAVA PROGRAMMING' book with bookid 105.
The Pricing relation stores information about the price of the various books sold by the bookstore. Note that the same book can be available in multiple formats at possibly different prices. The price field refers to the number of dollars. For instance a $25 purchase will have a price field of 25. Note that the bookid and format fields form the primary key for the relation. An example tuple is as follows:
(105, 'AUDIO', 25), indicating that the 'JAVA PROGRAMMING' book with bookid 105 is available in the audio format for $25.
Given the above schema, write queries for the following:
In: Computer Science
Is Copper completely obsolete?
Here is a direct quote from “Why such slow Wi-Fi?” in a recent Los
Angeles Times article:
“In an analysis of fixed broadband and mobile speeds in July,
Speedtest ranked the United State No. 9 for broadband and No. 46
for mobile (Nos.1, respectively, Singapore and Norway. Last:
Venezuela and Iraq). Part of the issue for Americans: Many of us
still have home service based on copper wire, not fiber.
Craig Ganssle, chief executive of Camp3, which works on wireless
infrastructures, explains this difference: Copper service is based
on the speed of sound (generally about 1,125 feet per second if
it’s 68 degrees and the air is dry), and fiber is based on the
speed of light (about 984 million feet per second).”
With a few exceptions, most of us get our home Internet access
through a cable modem and the wires that connect our modems to our
ISPs are made of copper. Let’s assume you are streaming a Netflix
movie. The nearest Open Connect appliance, which Netflix uses to
host and deliver movies to customers (see Chapter 11, pg. 360), is
3 miles from your home. Let’s also assume you have already found
the movie to watch and is ready to start. You click on the Play
button, a one-bit signal is sent over the 3-mile copper wire to
reach the Open Connect appliance, which then starts sending the
digitized movie frames back to your home, also over the 3-mile
copper wire.
Questions:
a. Given the quoted speeds above (i.e., 1,125 feet per second vs.
984 million feet per second), from the moment you click the Play
button, to the moment the first frame of the movie appears on your
screen, how long will it take (round-trip time) over a copper wire?
Over a fiber optic cable?
Note: 1 mile = 5,280 feet
Round-trip time = (Distance / Speed) × 2
b. How does your calculated result over a copper wire compare to
your own experience of streaming movies on the Internet, excluding
any buffering time? Do you see any problem with what the expert in
the article above was saying? Hint: this expert did not get some
basic facts of physics right.
In: Computer Science
HTML WEBSITE WITH CSS LAYOUT
1. Create a studentregistration form with the following
fields:
> Email Address (Email)
> Desired Username (Text box)
> Password (Password)
> Family name (Text box)
> Middle Name/Initial (Text box)
> First name (Text box)
> Gender (Radio Button - Male or Female only!)
> ID Number (Text box)
> Mobile Number (Text box)
> Landline Number (Text box)
> Permanent Home Address (Text box)
> Degree/Course (Text box)
> Year Level (Drop down - year 1 to 5)
> Campus (Radio Button - Main Campus, Banilad Campus, LM Campus,
Mambaling Campus)
> Name of Father (Text box)
> Name of Mother (Text box)
> Name of Guardian (Text box)
> Hobbies (Checkbox, a user can select multiple hobbies, at
least 10 hoobies listed)
> Interests (Checkbox, a user can select multiple interest, at
least 10 interest listed)
> Civil Status (Dropdown - Single, Married, Separated,
Widow)
> Favorite Color (Color Picker)
> Date of Birth (Month, Day, Year - three textboxes)
> Describe yourself (Text area)
> Rate your satisfaction inside UC (Range input - ranging from 1
- 10)
> Submit button (Display "Registered" in a separate page when
the user click this button - this is only for display, no backend
scripts required to save the data)
> Clear button (Clear all the fields when user clicks)
2. Create a login form.
> Username
> Password
> Login Button
> Reset Button
* Arrange all your fields in a table format. You can also use the
fieldset element to arrange your fields.
* Make your design clean as possible.
* Make all your fonts readable.
* If you want to use/apply colors, use only 3 colors.
* Include the Registration and Login Links in the menu area.
* Maintain the layout of your page.
In: Computer Science
Write a program to implement a distributed chat server
using
TCP sockets in ‘C’.
In: Computer Science
How are PHP arrays different than arrays in other programming languages? Please discuss in depth.
In: Computer Science
Could i please have some assistance with the following questions.
a) When using the exponential weighted moving average (EWMA) to calculate the running time of the RTT, what does the constant ‘x’ control?
b) Consider a TCP segment. What is sequence number? What is the range of the sequence number? What is the acknowledge number (ACK)?
In: Computer Science
topic : Introduction to TCP/IP
1) The explanation of how data flows through the network?
2) Understanding of TCP/IP architecture and layers and comparison
with the OSI layers?
3) Understanding of the role of protocol analysis in network
management?
topic : Name Resolution on IP
Network
4) Fundamentals of name resolution protocols ?
5) How name resolution works in IPv4 networks, including the DNS
database structure, the DNS namespace, DNS database records, the
delegation of DNS authority, and the different types of DNS
servers, and explain how name servers work?
6) How name resolution works on IPv6 networks, including the use of
AAAA records,the use of source &destination address selection,
how rules are organized by the source and destination address
algorithms, & end-to-end address selection process?
topic : Transport Layer Protocols
7) Understanding of the differences between connectionless and
connection-oriented transport mechanisms?
8) Explain understanding of key features and functions of the User
Datagram Protocol (UDP) and the Transmission Control Protocol (TCP)
?
In: Computer Science
Could i please have some assistance with the following questions.
a) What is the purpose of port numbers? how are they used?
b) Why does TCP probe the network continuously until it experiences a loss?
c) What is the difference between the congestion window and the received window?
d) What is the benefit of TCP Reno over TCP Tahoe?
In: Computer Science
Create a Python file named num_sum.py that contains:
In: Computer Science
Creat a python method for a binary tree class that has an inputted lookup value and will output if the lookup values exist within the Binary Tree by returning True or False. Exists within the binary tree -True. No exist within the binary tree - false.Test the method in your code
In: Computer Science