Questions
Write a paragraph to reflect on what you have learned in this assignment in terms of...

Write a paragraph to reflect on what you have learned in this assignment in terms of the difference between relational databases versus spreadsheets. Discuss ways in which a relational database could be useful for your work (if you have a job) or for your personal or professional projects (if you are a full-time student)

In: Computer Science

void main() {     Grade g1; //object for grade     char h;     cout << "enter...

void main()
{
    Grade g1; //object for grade
    char h;

    cout << "enter character" ;
    cin>>h; //getting value
    g1.grade(h);
    g1.print();

   getch();
}

create an output file (named “output.txt”), and save the character to this output file. Last, close this output file

In: Computer Science

(C++) I'm getting a few errors that prevents the program from running what is causing this?...

(C++) I'm getting a few errors that prevents the program from running what is causing this?

"

routes3.cpp:202:9: warning: add explicit braces to avoid dangling else

[-Wdangling-else]

else {

^

"

#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <cstring>
using namespace std;

class Leg{
const char* const startCity;
const char* const endCity;
const int dist;

public:
Leg(const char* const, const char* const, int);
Leg& operator= (const Leg&);
int getDist() const {return dist;}
void output(ostream&) const;
friend class Route;
friend class ShortestRoute;
};


class Route{
friend class ShortestRoute;
vector<const Leg*> legs;
const int dist;

public:
Route(const Leg&);
Route(const Route&, const Leg&);
Route& operator=(const Route&);
int getDistance() const {return dist;}
void output(ostream&) const;
friend bool operator<(const Route&, const Route&);

};


class ShortestRoute
{
static const int legSize;
static const Leg legs[];

public:
static const Route anyRoute(const char* const, const char* const);
static const Route shortestRoute(const char* const, const char* const);
};

const Leg ShortestRoute::legs[] =
{
Leg("Denver", "Kansas City", 395),

Leg("Philadelphia", "New York", 96),

Leg("Oklahoma City", "Kansas City", 347),

Leg("San Jose", "Las Vegas", 382),

Leg("San Fransisco", "San Jose", 42),

Leg("San Jose", "Los Angeles", 306),

Leg("Albuquerque", "Dallas", 646),

Leg("Pittsburgh", "New York", 371),

Leg("Los Angeles", "Phoenix", 372),

Leg("Phoenix", "Albuquerque", 421),

Leg("Las Vegas", "Albuquerque", 573),

Leg("Sacramento", "Reno", 138),

Leg("Memphis", "Atlanta", 383),

Leg("Albuquerque", "Kansas City", 617),

Leg("Albuquerque", "Oklahoma City", 541),

Leg("Oklahoma City", "St Louis", 498),

Leg("Cincinnati", "Columbus", 102),

Leg("Cincinnati", "Cleveland", 217),

Leg("Oklahoma City", "Memphis", 467),

Leg("Dallas", "Memphis", 451),

Leg("Richmond", "Washington", 109),

Leg("Chicago", "Indianapolis", 183),

Leg("Indianapolis", "Cincinnati", 115),

Leg("Los Angeles", "Las Vegas", 263),

Leg("Los Angeles", "Albuquerque", 789),

Leg("Louisville", "Cincinnati", 100),

Leg("St Louis", "Indianapolis", 243),

Leg("Washington", "Baltimore", 39),

Leg("Baltimore", "Philadelphia", 105),

Leg("Las Vegas", "Denver", 754),

Leg("Las Vegas", "Salt Lake City", 420),

Leg("Reno", "Salt Lake City", 518),

Leg("Salt Lake City", "Denver", 519),

Leg("Kansas City", "Chicago", 510),

Leg("Memphis", "Louisville", 383),

Leg("San Fransisco", "Sacramento", 90),

Leg("Memphis", "Nashville", 210),

Leg("Kansas City", "St Louis", 249),

Leg("Nashville", "Charlotte", 409),

Leg("Atlanta", "Charlotte", 226),

Leg("Detroit", "Cleveland", 169),

Leg("Cleveland", "Pittsburgh", 134),

Leg("Louisville", "Richmond", 563),

Leg("Pittsburgh", "Washington", 241),

Leg("Pittsburgh", "Philadelphia", 304),

Leg("Chicago", "Detroit", 283),

Leg("Columbus", "Pittsburgh", 142),

Leg("Charlotte", "Richmond", 291),

//SF to NY SuperHighway
Leg("San Fransisco", "New York", 21000)
};


int main(){

cout << endl << "Programmer: \n";
cout << "Course: \n";

const Route route1 = ShortestRoute::anyRoute("San Francisco", "New York City");
route1.output(cout);

const Route route2 = ShortestRoute::shortestRoute("San Francisco", "New York City");
route2.output(cout);

return 0;
}

const Route ShortestRoute::anyRoute(const char* const start, const char* const end) {
for (int i = 0; i < ShortestRoute::legSize; i++) {
if (strcmp(ShortestRoute::legs[i].endCity, end) == 0) {
if (strcmp(ShortestRoute::legs[i].startCity, start) == 0) {
Route r(legs[i]);
return r;
}
else {
Route x(ShortestRoute::anyRoute(start,ShortestRoute::legs[i].startCity),legs[i]);
return x;
}
}
}
throw "Can't find a possible route!";
}

const Route ShortestRoute::shortestRoute(const char* const start, const char* const end){
set<Route> s;
for (int i = 0; i < ShortestRoute::legSize; i++) {
for (int j = 0; j < ShortestRoute::legSize; j++) {
if (strcmp(ShortestRoute::legs[i].endCity, end) == 0)
if (strcmp(ShortestRoute::legs[i].startCity, start) == 0) {
Route r(legs[i]);
return r;
}
else {
Route x(ShortestRoute::anyRoute(start, ShortestRoute::legs[i].startCity), legs[i]);
s.insert(x);
}
}
}
return *(s.begin());
}

bool operator<(const Route& a, const Route& b)
{
return a.dist < b.dist;
}


Leg& Leg::operator=(const Leg& copy){
Leg& host = *this;
if(this != &copy){
const_cast<const char*&>(host.startCity) = copy.startCity;
const_cast<const char*&>(host.endCity) = copy.endCity;
const_cast<int&>(host.dist) = copy.dist;
}
return host;
}


void Leg::output(ostream& os) const{
os << startCity << " to " << endCity << " is " << dist << " miles" << endl;
}

Route::Route(const Leg& leg) : dist(leg.getDist()){
legs.push_back(&leg);
}


Route::Route(const Route& route, const Leg& leg)
: legs(route.legs), dist(route.dist+leg.dist){
if (strcmp(route.legs.back()->endCity, leg.startCity) != 0)
throw "Mismatch";
legs.push_back(&leg);
}


void Route::output(ostream& os) const{
string output = "Route: ";
string temp = " to ";
int totalDist = 0;
for(int i = 0; i < legs.size(); i++){
output += legs[i]->startCity;
if(i != legs.size()-1) {
output += temp;
}
else{
output += (temp + legs[i]->endCity);
}
totalDist += legs[i]->getDist();
}
output += (" "+to_string(totalDist)+" miles\n");
os << output;
}

Route& Route::operator=(const Route& copy){
Route& host = *this;
if(this != &copy){
const_cast<int&>(host.dist) = copy.getDistance();
host.legs = copy.legs;
}
return host;
}

In: Computer Science

For this exercise, you will implement two programs that allow the user to enter grades in...

For this exercise, you will implement two programs that allow the user to enter grades in a gradebook. The first program will use one‐dimensional arrays, and the second program will use two‐dimensional arrays. The two programs function the same

Write an application that prints out the final grade of the students in a class and the average for the whole class. There are a total of 3 quizzes. You will need 4 arrays:

1. An array of type int to store all the ID's

2. An array of type double to store all scores for quiz 1

3. An array of type double to store all scores for quiz 2

4. An array of type double to store all scores for quiz 3

How to proceed:

1. Ask the user how many students are in the class, so you can set the length of all the arrays.

2. Allocate 4 arrays that will store the data.

3. Use a FOR loop to retrieve and store all the data.

4. Use another FOR loop to  

a. Output the final score for each student.

b. Keep track of all scores to later compute the average for the class.

5. Calculate and Output the average for the class.

Format all floating‐point numbers to 2 decimal places

Your program MUST receive user input as shown in the sample output.

Please leave comments on the program so i can give you a thumbs up :)!

Also, this is for java language.

In: Computer Science

Subject: Security Policy & Procedures Describe what a Data Flow Diagram is and why it is...

Subject: Security Policy & Procedures

Describe what a Data Flow Diagram is and why it is useful for IT auditing. One paragraph should describe what a Data Flow Diagram is, and the second paragraph should describe why it is useful for IT auditing.

In: Computer Science

You will need to use only two arrays:  One array of type int to store...

You will need to use only two arrays:One array of type int to store all the ID's

One two‐dimensional array of type double to store all the scores for all quizzes

Note: The two dimensional array can be represented also with the rows being the students and the columns being the quizzes.

How to proceed:

1. Declare the number of quizzes as a constant, outside the main method. (Recall that identifiers for constants are all in CAPITAL_LETTERS.)

2. Ask the user how many students are in the class, so you can set the length of all the arrays.

3. Allocate 2 arrays, one one‐dimensional and the other two‐dimensional, that will store the data.

4. Use two nested FOR loops to retrieve and store all the data.

5. Use another two nested FOR loops to  

a. Output the final score for each student.

b. Keep track of all scores to later compute the average for the class.

6. Calculate and Output the average for the class.

Format all floating‐point numbers to 2 decimal places.

Please leave comments on the program so i can give you a thumbs up :)!

also, this is for java language

In: Computer Science

Assembly Language Programming: a)If eax = 0FFFFFFFFH, and edx = 0FFFFFFFFH, then the instruction                            

Assembly Language Programming:

a)If eax = 0FFFFFFFFH, and edx = 0FFFFFFFFH, then the instruction

                             imul edx

will leave the value ______________________________ in the edx register.

b)If eax = 0D000000DH, and edx = 50000005H, then the instruction

                             idiv dl

will leave the value ______________________________ in the eax register.

c)If ax = 3BC4H, then the following instructions

                             cmp ah, al

jg   Label

will / will not cause a jump to Label.

d)If ax = 3BC4H, then the following instructions

                             cmp ah, al

ja   Label

will / will not cause a jump to Label.

f) The following instructions

                             mov eax, 0

mov ecx, 1100B

L1: inc eax

loop L1

will leave the value ______________________________ in the eax register.

In: Computer Science

Given a string str of even length, print out the first half.   Methods to use: substring(),...

Given a string str of even length, print out the first half.  

Methods to use: substring(), length()

Testing cases:

WooHoo => Woo

HelloThere   => Hello

abcdef => abc

ab   => a

0123456789   => 01234

kitten   => kit

(Note that the sample input test cases are shown before the “=>” and the expected output each test case is after the “=>”.

Your program should print out the expected output only, not the input.)


this is for java language

In: Computer Science

3. What are some issues that can arise when importing data from an outside source into...

3. What are some issues that can arise when importing data from an outside

source into a DBMS? What are some tools or ways to resolve these issues?

4. Why do tables have to be related in Access for queries to work correctly?

5. What are the benefits and drawbacks for using a DBMS vs. a spreadsheet

to store data?

In: Computer Science

Describe and explain the advantages and disadvantages of network-based and host-based intrusion detection categories.

Describe and explain the advantages and disadvantages of network-based and host-based intrusion detection categories.

In: Computer Science

Write three to four paragraphs using the below scenario and attach your submission. Remember to check...

Write three to four paragraphs using the below scenario and attach your submission. Remember to check the rubric before submitting.

Sharing Trade Secrets Scenario

Suppose there are two large, competing telecommunication firms in your city (Company X and Company Y). The companies are hostile to each other. You have worked for Company X for five years in a position that gives you access to company trade secrets. You are now interviewing for a job with Company Y that would be a substantial step up in your career. During the interview, you get the impression that Company Y expects you to share your knowledge, including the trade secrets, if they hire you.

  1. What are the ethical issues involved?
  2. What are the legal issues?
  3. Are they the same as the ethical issues?

Let's say that you have signed a non-disclosure agreement as part of your condition of employment with Company X.

  1. Does this change the ethics involved?
  2. Suppose Company X fired you. Would the ethics involved change?

In: Computer Science

3. (5pts.) When should a Count controlled loop be used? C++

3. (5pts.) When should a Count controlled loop be used? C++

In: Computer Science

Please create a Python program that can convert a text string to an encrypted message and...

Please create a Python program that can convert a text string to an encrypted message and convert the encrypted message back to the original message.

  1. Read a string message from your keyboard.
  2. Print the input string.
  3. Convert this message into an encrypted message by using a list element substitution.
  4. Print your encrypted message.
  5. Convert this encrypted message back to the original message by using a list element substitution.
  6. Print your original message.

Important: please use a dictionary data type and append function.

In: Computer Science

Question 1: Processing Compound Data: Binary Trees A binary tree is a tuple with the following...

Question 1:

Processing Compound Data: Binary Trees

A binary tree is a tuple with the following recursive structure  

("btree", [val, left_tree, right_tree])

where first part of the tuple is a string "btree" and second part of the tuple is a list in which val is the value at the root and left_tree and right_tree are the binary trees for the left and right children or

("btree",[]) for the empty tree.  

(A)

Implement a binary tree ADT.

Type Name Description

Create the following tree in python. Use this tree to test the above functions of the tree ADT.

(B)

Implement the functions preorder,inorder and postorder.

Function preorder takes a tree as an argument and returns a list with the root value being the first element in the list followed by the elements of the left tree and then right tree. Function inorder takes a tree as an argument and returns a list with the elements of the left tree, followed by the root value and then right tree.

Function postorder takes a tree as an argument and returns a list with the elements of the left tree, followed by the elements of the right tree and then root value.

For example

preorder(t1) => [7, 5, 11, 9]

inorder(t1) => [5, 7, 9, 11]

postorder(t1) =>[5, 9, 11, 7]

In: Computer Science

1. Define NTFS alternate data stream( 1 Marks). What is the Significance of whole disk encryption...

1. Define NTFS alternate data stream( 1 Marks).

What is the Significance of whole disk encryption and challenges it poses in digital forensics investigations?Total

In: Computer Science