In: Computer Science
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 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:
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 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, and security configurations.
In: Computer Science
layers.
In: Computer Science
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 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 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 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 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, 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 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>
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
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 program should ask for the following data if the patient was an
outpatient:
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