Questions
Decide which one of the following statements is an example of Inductive OR Deductivereasoning: It is...

  1. Decide which one of the following statements is an example of Inductive OR Deductivereasoning:
  1. It is dangerous to drive on icy streets. The streets are icy now, so it is dangerous to drive now.
  2. Elephants have cells in their bodies and all cells have DNA, so elephants haveDNA.
  3. All birds have feathers and robins are birds, so robins have feathers.
  4. Red meat has iron in it and beef is red meat, so beef has iron in it.
  5. John is an excellent swimmer. John’s family has a swimming pool. John’s sister Mary must also be an excellent swimmer.
  6. Ray is a football player. All football players weigh more than 170 pounds. Ray weighs more than 170 pounds.

In: Computer Science

The project description: As a programmer, you have been asked to write a Java application, using...

The project description: As a programmer, you have been asked to write a Java application, using OOP concepts, for a Hospital with the following requirements: • The Hospital has several employees and each one of them has an ID (int), name (string), address (string), mobile phone number (string), email (string) and salary (double) with suitable data types. • The employees are divided into: o Administration staff: who have in addition to the previous information their position (string). o Doctor: who have also a rank (string) and specialty (string). The project requirements: • You will need to create all the needed Java classes with all the required information. • You have to apply all the OOP (Object Oriented Programming) concepts that we have covered in this module (i.e. inheritance, polymorphism, interface and collections) • Include a Microsoft Word document (name it as readme.doc) that includes several screenshots of your Netbeans IDE application GUI interface as well as the output screenshot results. Provide all assumptions that you have made during design and implementation. • Include the whole Netbeans Java project with all source codes. Write as much comments as possible to document your source codes. At the end, you will need to create a testing class (e.g. Hospital.java) with the static main() method with the following requirements: • It must have initial fixed collections of working staff (at least 3 administration staffs and 2 doctors) • The program will print a selection screen where the user can choose the operation he/she wants to perform. The selection screen will be repeated after each selection until the staff type the number 4 to completely exit from the program: 1. Add an administration staff (by providing all her/his information) to the list of all administration staff 2. Add a doctor (by providing all her/his information) to the list of all doctors 3. Print all working staff (remember to differentiate between administration staff and doctors in the output printout 4. Exit the program

In: Computer Science

Your first project is to build your own home page. The page should be some sort...

Your first project is to build your own home page. The page should be some sort of introduction to you, and include more than a single page.

Other than that, there are no rigid guidelines as to what these pages should contain.

If you're looking for ideas of what to put into your personal pages, here are some starters:

  • Information about you
  • Information about your occupation and your job
  • Friends and Family
  • Pets
  • Spouse/SO/Partner
  • Your most recent vacation
  • Favorite TV shows (Tip: Link to the show's/movie's site or to its page on imdb.com
  • Where and with whom you live
  • What you do with your spare time (if you have any)
  • Any organizations to which you belong or sponsor
  • You can include some opinions or articles you may have written.

These are just ideas, though. What you put on your home site is entirely up to you.

You might want to consider your audience a specific group, such as classmates and the instructor--in which case you might want to include information such why you're taking this class, what kind of computer and 'net connection you're using, etc. Or, you may want to make your audience anyone who might be interested in or you know

In: Computer Science

Write code that classifies a given amount of money (which you store in a variable named...

Write code that classifies a given amount of money (which you store in a variable named amount), specified in cents, as greater monetary units. Your code lists the monetary equivalent in dollars (100 ct), quarters (25 ct), dimes (10 ct), nickels (5 ct), and pennies (1 ct). Your program should report the maximum number of dollars that fit in the amount, then the maximum number of quarters that fit in the remainder after you subtract the dollars, then the maximum number of dimes that fit in the remainder after you subtract the dollars and quarters, and so on for nickels and pennies. The result is that you express the amount as the minimum number of coins needed. Please show me how to do it in the jupyter notebook.

In: Computer Science

Discuss how to implement an isolated test lab environment to test DHCP split scope, failover scope,...

Discuss how to implement an isolated test lab environment to test DHCP split scope, failover scope, and security configurations.

In: Computer Science

List four alternate terms for "physical address". Name the TCP/IP model layers, and map them to...

  1. List four alternate terms for "physical address".
  1. Name the TCP/IP model layers, and map them to the corresponding OSI model

layers.

  1. At which TCP/IP model layer(s) do UDP and TCP reside?
  1. List five TCP/IP model application layer protocols.
  1. You are converting your network to an IP addressing scheme. You assign a junior administrator the task of assigning addresses to your network hosts from the IP address range 202.17.68.0-202.17.68.255. He states that he used every one of the 256 addresses in the range. Which devices on the network will be unable to communicate with other network devices?

In: Computer Science

Python 3.7: Give the following sample code, write the following programs: • An iterator class called...

Python 3.7:

Give the following sample code, write the following programs:
• An iterator class called Iteratefirstn that implements __iter__() and __next__() methods where next method should raise an exception for the cur index if it is passed the last element otherwise set cur index to the next index and advance the index by one, i.e. cur, num = num, num+1. Instantiate the class to calculate the sum of 1000000 elements similar to the example.
• Instead of implementing the class, write a generator function that does the same thing.
Sample code:
def firstn(n):
num, nums = 0, []
while num < n:
nums.append(num)
num += 1
return nums
sum_of_first_n = sum(firstn(1000000))  

In: Computer Science

JAVA I need to make it that I can expand the stack for everytime a push...

JAVA

I need to make it that I can expand the stack for everytime a push operation is performed that would normally cause an overflow, returning a false value. Should accompany 3 nodes initially.

DriverStack.java

public class DriverStack {
  
public static void main (String[] args)
{
  
Stack s = new Stack(3);
Listing l;
Listing l1 = new Listing ("Bill", "1st Avenue", "123 4567");
Listing l2 = new Listing ("Alec", "2nd Avenue", "456 4567");
Listing l3 = new Listing ("James", "3rd Avenue", "367 8896");
Listing l4 = new Listing ("Nico", "4th Avenue", "322 1156");
  
System.out.println(s.pop());
System.out.println(s.push(l1));
System.out.println(s.push(l2));
System.out.println(s.push(l3));
System.out.println(s.push(l4));
  
System.out.println("\n");

System.out.println("----------------All listings with one over flow----------------" + "\n");
  
s.showAll(); //shows listings
  
System.out.println("----------------Tries to pop the Listing '1'----------------" + "\n");

//Three pop operations
l = s.pop();
System.out.println(l.toString());
  
l = s.pop();
System.out.println(l.toString());
  
l = s.pop();
System.out.println(l.toString());


l = s.pop(); //will try to pop an already empty stack
  
System.out.println(l);
System.exit(0);
  
}
  
}

Stack.java

public class Stack
{
private Listing[] data;
private int top;
private int size;
  
public Stack()
{
top = -1;
size = 3;
data = new Listing[3];
}
public Stack (int n)
{
top = -1;
size = n;
data = new Listing[n];
}
  
public void settop()
  
{
top=-1;
}
  
  
public boolean push(Listing newNode)
{
if(top == size - 1)
return false; //overflow
else
{

top = top + 1;
data[top] = newNode.deepCopy();
return true;
}
}
  
public Listing pop()
{
int topLocation;
if(top == -1)
  
return null; //underflow error
else
{
topLocation = top;
top = top - 1;
return data[topLocation];
  
}
}
  
public void showAll()
{
for (int i = top; i >= 0; i--)
System.out.println(data[i].toString());
  
}
  
public void initialStack()
{
top = -1;
}
  
public boolean StackEmpty()
  
{
if(top == -1)
return true;
else
return false;
  
}
  
public boolean StackFull()
  
{
if(top == size-1)
return true;
else
return false;
  
}
  
public Listing peek()

{

if(StackEmpty())

{

System.out.println("Stack is underflow");

return null;

}

else

{

return data[top];

}

}
  
  

  
}

There is one more class called Listing but I dont think anything needs done with that.

Please comment next to the new code that was added, Thank you!

In: Computer Science

4NCA: 4.1 List ways in which secret keys can be distributed to two communicating parties. 4.2...

4NCA:

  • 4.1 List ways in which secret keys can be distributed to two communicating parties.

  • 4.2 What is the difference between a session key and a master key?

  • 4.3 What is a key distribution center?

  • 4.4 What entities constitute a full-service Kerberos environment?

  • 4.5 In the context of Kerberos, what is a realm?

  • 4.6 What are the principal differences between version 4 and version 5 of Kerberos?

In: Computer Science

4DCA: Compare and contrast two difference cloud computing services (Amazon Web Service and Microsoft Azure). Explain...

4DCA:

Compare and contrast two difference cloud computing services (Amazon Web Service and Microsoft Azure). Explain the differences and the similarities and select your choice of providers if you had to make the decision for your business. Write up a comparison on the services offered

In: Computer Science

Why is it important to manage one's own website from a security point of view given...

Why is it important to manage one's own website from a security point of view given the times we live in?

In: Computer Science

Write a Java program (name it LargestOccurenceCount) that reads from the user positive non-zero integer values,...

Write a Java program (name it LargestOccurenceCount) that reads from the user positive non-zero integer values, finds the largest value, and counts it occurrences. Assume that the input ends with number 0 (as sentinel value to stop the sentinel loop). The program should ignore any negative input and should continue to run.

Hint: to remember/save entered (good) values, you can concatenate them into a string (separated by spaces) that you can output later on.

Sample runs showing input prompts and outputs are (DO NOT read inputs as String type):

Enter positive integers (0 to quit): 3 4 5 -9 4 2 5 1 -5 2 5 0

You entered: 3 4 5 4 2 5 1 2 5

Largest value: 5

Occurrences: 3 times

Enter positive integers (0 to quit): 3 7 5 -4 4 2 -5 5 1 7 7 0

You entered: 3 7 5 4 2 5 1 7 7

Largest value: 7

Occurrences: 3 times

Document your code, and organize and space out your outputs as shown. Design your program such that it allows the user to re-run the program with different inputs in the same run (i.e., use a sentinel loop structure).

In: Computer Science

Using C++, write a program to calculate the height and velocity of a ball thrown upward...

Using C++, write a program to calculate the height and velocity of a ball thrown upward at a user-specified height and speed in 10 seconds. Position (h) and velocity (v) of the ball as a function of time are given by the equations: h(t) =(1/2)gt2 + v0t + h0 v(t) = gt + v0

In: Computer Science

Take the code below, add the parameter validation as prompted by the highlighted comments. #include <iostream>...

Take the code below, add the parameter validation as prompted by the highlighted comments.

#include <iostream>
using namespace std;

// Prototype (Wait, what's this? Hmmm... how would you find out? )
void calculateBill(double, int);

int main()
{
// local variables
int numMonths = 10;
double rate = 25.99;

// Perform a test for $25.99 membership.
cout << "Calling the calculateBill function with arguments "
??? << rate << " and " << numMonths << "\n";
total = calculateBill(rate, numMonths);
cout << "Bill is " << calculateBill << "\n";

// Perform a test for 70.50 membership.
numMonths = 5;
rate = 70.50;
cout << "Calling the calculateBill function with arguments "
??? << rate << " and " << numMonths << "\n";
total = calculateBill(rate, numMonths);
cout << "Bill is " << calculateBill << "\n";

// Perform a test for $-5 membership.
numMonths = 5;
rate = -5;
cout << "Calling the calculateBill function with arguments "
??? << rate << " and " << numMonths << "\n";
total = calculateBill(rate, numMonths);
cout << "Bill is " << calculateBill << "\n";

//// What should you add to your function now?

// Perform a test for -10 months. Keep -5 to make sure you added that input validation
numMonths = -10;
rate = -5;
cout << "Calling the calculateBill function with arguments "
??? << rate << " and " << numMonths << "\n";
total = calculateBill(rate, numMonths);
cout << "Bill is " << calculateBill << "\n";

//// What should you add to your function now?

return 0;
}

//*****************************************************************
// Definition of function calculateBilll. The memberRate parameter holds *
// the monthly membership rate and the months parameter holds the *
// number of months. The function displays the total charges. *
//*****************************************************************
double calculateBill(double memberRate, int months)
{
return (memberRate * months);
}

In: Computer Science

C++ program Overloaded Hospital Write a c++ program that computes and displays the charges for a...

C++ program

Overloaded Hospital

Write a c++ program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered:

  • The number of days spent in the hospital
  • The daily rate
  • Hospital medication charges
  • Charges for hospital services (lab tests, etc.)


The program should ask for the following data if the patient was an outpatient:

  • Charges for hospital services (lab tests, etc.)
  • Hospital medication charges


The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges.

Input Validation: Do not accept negative numbers for any data.

In: Computer Science