What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them.
In: Computer Science
, design the information security of an organization
In: Computer Science
The need to build a new infrastructure to utilize digital technology is constantly increasing, but it is difficult to secure new infrastructure by increasing the number of system resources required indefinitely. If the cost of IT infrastructure is calculated by adding up (1 )fixed and (2) operational costs, what difference will each cost show before and after the introduction of the cloud?
In: Computer Science
Discuss the interdependence that exists between Database System Development Life Cycle stages.
In: Computer Science
Q1(a) A class named “Employee” holds information like employee code, name,gender, year of joining. Write a program in C++ to create three objects of employee and enter some data into it through setters. Make getters and setters for all employee information. Then ask the user to enter current year. Display the names of those employees whose tenure is 2 or more than 2 years according to the given current year only using getters
(b)A class named “Employee” holds information like employee
code, name,gender, year of joining. Write a program to create five
hundred objects (Array of employee objects )of employee and enter
some data into it through setters. Make getters and setters for all
employee information. Then ask the user to enter current year.
Display the names of those employees whose tenure is 5 or more than
5 years according to the given current year only using
getters.
Note: employee code is automatically assigned to newly created
object by calling default constructor
(b) Define a class StudentReport with the following
specification:
Private members :
adno 4 digit admission number
name 20 characters
marks an array of 5 floating point values
average average marks obtained
GETAVG() a function to compute the average obtained in five
subject
Public members:
READINFO() function to accept values for adno, name, marks. Invoke
the function
GETAVG()
DISPLAYINFO() function to display all data members of StudentReport
on the screen.
You should give function definitions outside the class using scope
resolution operator.
Use C++ to answer
In: Computer Science
the process used to attack networks and the devices on networks. APA FORMAT
In: Computer Science
Implement synchronous send and receive of one word messages (also known as Ada-style rendezvous), using condition variables (don't use semaphores!). Implement the Communicator class with operations, void speak(int word) and int listen().
speak() atomically waits until listen() is called on the same Communicator object, and then transfers the word over to listen(). Once the transfer is made, both can return. Similarly, listen() waits until speak() is called, at which point the transfer is made, and both can return (listen() returns the word). Your solution should work even if there are multiple speakers and listeners for the same Communicator (note: this is equivalent to a zero-length bounded buffer; since the buffer has no room, the producer and consumer must interact directly, requiring that they wait for one another). Each communicator should only use exactly one lock. If you're using more than one lock, you're making things too complicated.
In: Computer Science
What are some of the common types of attacks against networks and devices on networks? apa format
In: Computer Science
In C++, I have 3 files (Main.cpp, Point.cpp, Point.h). When Compiled and run, it produces 2 errors, in Main.cpp "cannot convert from double to point" and in Point.cpp "name followed by :: must be a class or namespace name". How do you go about fixing these errors without editing Main.cpp? Thanks in advance.
//main.cpp
#include <iostream>
#include <cmath>
#include "Point.h"
using namespace std;
const double PI = 3.14159265359;
const double TOL = .0000001; //allows us to do a comparison for
double value equality
int main()
{
int toTest = 0;
//TEST AS YOU DEVELOP COMMENT OUT EVERYTHING BUT WHAT
YOU HAVE IMPLEMENTED
//AND UNCOMMENT AS YOU CREATE.
//(you can look below to see what I make this variable
to test given things)
cout << "MUST IMPLEMENT GETTERS BEFORE TESTING
\n";
cout << "What would you like to test? \n";
cout << "1-value constructor \n";
cout << "2-copy constructor \n";
cout << "3-setters test \n";
cout << "4-translation test \n";
cout << "5-scaling test \n";
cout << "6-reflect over x-axis test \n";
cout << "7-reflect over y-axis test \n";
cout << "8-rotation \n";
cout << "9-assignment operator \n";
cout << "10-operator equals equals \n";
cout << "11-cin overload \n";
cout << "12-cout overload \n";
cin >> toTest;
Point a; // a should be at (0,0)
Point b(5.0); //b should be at (5.0,0)
/* incremental test line
Point c(-15.3, -32.22); //c should be at (-15.3,
-32.33)
if(toTest==1)
{
cout<<"**Value Constructor
Test: \n";
if(abs(a.get_x())<TOL &&
abs(a.get_y())<TOL &&
abs(b.get_x()-5)<TOL && abs(b.get_y())<TOL
&&
abs(-15.3-c.get_x())<TOL &&
abs(-32.22-c.get_y())<TOL)
{
cout<<"
Value Constructor Works\n" <<endl;
}
else
{
cout<<"
Value Constructor Failed\n"<<endl;
}
}
/* Point d(c);
if(toTest==2)
{
cout<<"\n**Copy Constructor
Test: \n";
if(abs(d.get_x()-c.get_x())<TOL
&& abs(d.get_y()-c.get_y())<TOL)
{
cout<<"
Copy Constructor Works\n"<<endl;
}
else
{
cout<<"
Copy Constructor Failed\n"<<endl;
}
}
if(toTest==3)
{
cout<<"\n**Setters Test:
\n";
a.set_x(5.3); a.set_y(-3.2);
if(abs(a.get_x()-5.3)<TOL
&& abs(a.get_y()+3.2)<TOL)
{
cout<<"
Setters Work\n"<<endl;
}
else
{
cout<<"
Setters Failed\n"<<endl;
}
}
if(toTest==4)
{
cout<<"\n**Translation Test:
\n";
a.translate(5.3,-3.2);
if(abs(a.get_x()-5.3)<TOL
&& abs(a.get_y()+3.2)<TOL)
{
cout<<"
Translate Works\n"<<endl;
}
else
{
cout<<"
Translate Failed\n"<<endl;
}
}
if(toTest==5)
{
cout<<"\n**Scale Test:
\n";
c.scale(-3);
if(abs(c.get_x()-45.9)<TOL
&& (abs(c.get_y()-96.66)<TOL))
{
cout<<"
Scale Works\n"<<endl;
}
else
{
cout<<"
Scale Failed\n"<<endl;
}
}
if(toTest==6)
{
cout<<"\n**Reflect Over
X-Axis Test: ";
c.reflect_x();
if(abs(c.get_y()-32.22)<TOL)
{
cout<<"
Reflect Over X-axis Works\n"<<endl;
}
else
{
cout<<"
Reflect Over X-Axis Failed\n"<<endl;
}
}
if(toTest==7)
{
cout<<"\n**Reflect Over
Y-Axis Test: ";
c.reflect_y();
if(abs(c.get_x()-15.3)<TOL)
{
cout<<"
Reflect Over Y-Axis Works\n"<<endl;
}
else
{
cout<<"
Reflect Over Y-Axis Failed\n"<<endl;
}
}
if(toTest==8)
{
Point e(-1,0); //e shoule be at
(-1, 0)
cout<<"\n**Rotation of Point
Test: ";
e.rotate(PI/2);
if(abs(e.get_x())<TOL &&
abs(e.get_y()+1)<TOL)
{
cout<<"
Rotation Of PI/2 (90 deg CCW) Worked\n"<<endl;
}
else
{
cout<<"
Rotation Of PI/2 (90 deg CCW) Failed\n"<<endl;
}
}
if(toTest==9)
{
cout<<"\n**Operator equals
Test: ";
d=b;
if((abs(d.get_x()-b.get_x())<TOL) &&
(abs(d.get_y()-b.get_y())<TOL))
{
cout<<"
Operator Equals Test Passed\n"<<endl;
}
else
{
cout<<"
Operator Equals Test Failed\n"<<endl;
}
}
if(toTest==10)
{
cout<<"\n**Operator equals
equals Test: ";
Point e(-15.3, -32.22);
if(e==c)
{
cout<<"
Operator equals equals Test Passed \n"<<endl;
}
else
{
cout<<"
Operator equals equals Test Failed \n"<<endl;
}
}
if(toTest==11)
{
cout<<"\n**CIN Test: \ncin
the values 10 and 20 to test this with (10,20): ";
cin>>d;
if(abs(d.get_x()-10)<TOL
&& abs(d.get_y()-20)<TOL)
{
cout<<"CIN
Test Passed\n"<<endl;
}
else
{
cout<<"CIN
Test Failed\n"<<endl;
}
}
if(toTest==12)
{
cout<<"**COUT Test: coutting
Points a,b,c: \n";
cout<<a;
cout<<b;
cout<<c;
}*/
}
//Point.cpp
#include "Point.h"
#include <iostream>
#include <cstdlib>
using namespace std;
double x = 0;
double y = 0;
void Point::point()
{
x = 0;
y = 0;
}
void Point::point(double inX)
{
x = inX;
y = 0;
}
void Point::point(double inX, double inY)
{
x = inX;
y = inY;
}
double getX()
{
return x;
}
double getY()
{
return y;
}
void setPoint(double a, double b)
{
}
//Point.h
#include <iostream>
#ifndef Point_H;
using namespace std;
class Point
{
public:
static double x;
static double y;
void point();
void point(double x);
void point(double x, double y);
double getX();
double getY();
void setPoint(double a, double b);
};
#endif
In: Computer Science
l = [0 1 -2 1 1];
d = [2 -2 4 2 2];
r = [-1 1 -1 -2 0];
b = [2 0 -6 1 4];
n = length(d);
x= zeros(n,1);
for i = 2:n
factor = l(i)/d(i-1);
d(i) = d(i) - factor*r(i-1);
b(i) = b(i) - factor*b(i-1);
end
x(n) = b(n)/d(n);
for i = n-1:-1:1
x(i) = b(i)-r(i)*x(i+1) / d(i);
end
x1 = x(1);
x2 = x(2);
x3 = x(3);
x4 = x(4);
fprintf('\nx1 = %f\nx2 = %f\nx3 = %f\nx4 = %f\n',x1,x2,x3,x4);
this is matlab code!
It's a question of getting answers using the Thomas method.
The answer should be x1=1, x2=0, x3=-1, x4=2, x5=1.
Please fix what's wrong.
In: Computer Science
Using jGRASP, write a Java program named LastnameFirstname11.java, using your last name and your first name, that does the following:
In: Computer Science
Please fllll this out thank you
/**
*
* Creates a six-sided die and rolls it 20 times. It outputs the
face values and also
* the number of times the die lands on 6.
*
* Creates 2 eight-sided dice and rolls the pair 10 times. It prints
out a sequence
* of pairs representing the face values as well as the number of
doubles.
*
* Allows the user to repeat the above steps as often as (s)he
wishes.
*
* @author (put your name here!!!)
* @version (3-20-19)
*/
import java.util.*;
public class TestDie
{
public static void main (String [] args)
{
Scanner keyIn = new Scanner(System.in);
// display output heading
System.out.println ("Programmer: put your name here!!");
System.out.println ("Course: COSC 111, Winter '19");
System.out.println ("Lab: Exam 2, part 2");
System.out.println ("Due date: 3-20-19\n");
// create a six-sided die
// create a Die object and then call the method setSides to set the
number of sides to 6
// roll the die 20 times, output the face value of each roll (4 per
line), and the
// number of times the die lands on 6.
// set up a loop that iterates exactly 20 times, and each time
through the loop do the following:
// roll the die by calling the method 'roll'; output the face value
of the die; check the face
// value to keep track of 6s, and check to see if you have printed
4 numbers already, if yes,
// then advance to the next line.
System.out.println("Rolling a 6-sided die 20 times:" );
// create two eight-sided dice
// create two 'Die' objects and then use the method 'setSides' with
each object to set its number of sides to 8
System.out.println("\nRolling a pair of 8-sided dice 10 times:");
// throw a pair of eight-sided dice 10 times, output the face
values of each throw as a pair
// and also the number of doubles (both dice land on the same face
value)
// set up a loop that iterates exactly 10 times, and each time
through the loop do the following:
// roll both die by calling the method 'roll' twice; print out
their face values as a pair;
// and check to see if both face values are the same, if yes, keep
track of it.
// add a do-while loop to repeat the above code as often as the user wishes
}
}
In: Computer Science
CPU Company, AMD vs Intel vs ARM
which CPU model that compete between these 3 companies? What's their specification?
In: Computer Science
CPU Company, AMD vs Intel vs ARM
For tablet or Laptop. or any devices that this CPU is equipped
with,
Which one is the BEST, BALANCE, & the WORST? Need Reasons
why
In: Computer Science
In: Computer Science