The following relations are part of a school database:
STUDENT(STUD#, STUD_NAME, MAJOR, YEAR, GPA)
TEACHER(FACULTY#, DEPT, TEACHERNAME)
ENROLLMENT(STUD#, COURSE#, GRADE)
RESPONSIBILITY(FACULTY#, COURSE#)
Using PROJECT, SELECT and JOIN, write the sequence of operations to answer each of the following questions:
What are the names of teachers who are responsible for courses in which students whose name is 'JONES' are enrolled?
Use relational Algebra and relational calculus for this question.
In: Computer Science
Create 512 subnets from Class A IP address range 10.*.*.*. For the first four (4) and last four (4) subnets, list the network IP address, broadcast IP address, 1st assignable IP address, and last assignable IP address. What subnet mask IP address will all devices in all subnets use?
In: Computer Science
PLEASE ANSWER IN C++
Given the starting point in a maze, you are to find and mark a path out of the maze, which is represented by a 20x20 array of 1s (representing hedges) and 0s (representing the foot-paths). There is only one exit from the maze (represented by E). You may move vertically or horizontally in any direction that contains a 0; you may not move into a square with a 1. If you move into the square with an E, you have exited the maze. If you are in a square with 1s on three sides, you must go back the way you came and try another path. You may not move diagonally. For this program, use can ONLY use a single linked list.
Program Requirements: Your program should use single linked list ONLY for finding the path. Input of program: Input is the following array of characters (1s, 0s, and E) from an ASCII text data file (maze.txt); as follows:
E0001110000000100100
11100011101110001111
11111000101000111000
00001110101100010010
01011000101111000110
00001110000110011110
11011100110110111000
00011110110111111101
01011011110110100001
01000000000110110111
11011011010010000000
01010010011000101011
01111000101110101110
00001110000111011001
01101011101101000011
11000110100111011010
01110000100100110011
11010111110110000000
01110100011000111110
00011001000011100010
Each data line consists of one row of maze. Starting points (i.e. a row, column pair) in the maze will be input from the keyboard.
Output of program: Echo print the maze complete with numbered rows and columns prior to asking the user for their starting point. For each entry into the maze, print the complete maze with a S in the starting point followed by the words ‘I am free’ if you have found a path out of the maze or the words ‘Help, I am trapped’ if you cannot. Your output could be in two formats: Print the path (by using a series of pluses (+)) you took through the maze should one be found OR Print the path as a single linked list. A program heading in the following format should begin your program:
// Program Name
// <your name>
// <date>
In: Computer Science
One of the major challenges associated with widespread adoption of social media is online deception. You are going to discuss the following two issues related to online deception.
1) Various types of deception in social media and illustrate them with real-world cases.
2) Strategies and clues you may use to detect and verify online deception.
In: Computer Science
1. How are different fonts set with Java GUI programs? What are font statistics?
2. What is meant by drawing a string with Java and how is this done?
In: Computer Science
In: Computer Science
Respond to the following in a minimum of 175 words:
An incident response plan (IRP) is a set of procedures to help an organization detect, respond to, and recover from security incidents.
List the roles and responsibilities that are included in an IRP.
Discuss how your organization (from Week 1) may respond to at least one cyberattack. The organization should have a response in accordance with the IRP.
I had chosen Health care
In: Computer Science
Exercise 1:
Write a program that converts a number entered in Roman numerals to decimal. Your program should consist of a class, say, Roman. An object of type Roman should do the following:
The decimal values of the Roman numerals are:
M 1000
D 500
C 100
L 50
X 10
V 5
I 1
In: Computer Science
(c++)You will be given a data file containing data for 10 students. The format is as follows - grades are double precision numbers:
Line 1: Header Information
Line 2: Student Full name
Line 3: Student ID
Line 4: testgrade_1 testgrade_2 testgrade_3 testgrade_4 testgrade_5
Line 5: Student Full name
Line 6: Student ID
Line 7: testgrade_1 testgrade_2 testgrade_3 testgrade_4 testgrade_5
Line 8: Student Full name
Line 9: Student ID
Line 10: testgrade_1 testgrade_2 testgrade_3 testgrade_4 testgrade_5
Etc.
Read the data into appropriate arrays. You do not need to create a dynamic array.
Determine the average of all the grades for each test, and print the test number then the name, student id, and grade for all students who fall below that average.
Determine the average of all the grades for each student.
Determine which student has the highest average grades - print their name and their average
Determine which student has the lowest average grades - print their name and their average
Student Learning Outcomes:
Creating and using functions
Creating and using non-dynamically allocated arrays - 1-Dimensional and/or 2-Dimensional
File input
Style
Variable Naming
Proper variable and function naming (not uppercase to start, descriptive of purpose)
Proper constant naming (all capital letters)
Comments
Programmer name, date, purpose
Useful, descriptive comments about program procedures
Useful, descriptive comments about function purpose, inputs, and outputs
In: Computer Science
1. A finite sequence of letters is called a palindrome if it reads the same forward or backward. Devise an algorithm for determining whether or not a string of n letters is a palindrome. Write your algorithm using the the same sort of pseudocode used in the text. Your algorithm should start with procedure palindrome (a1,a2,...,an: lowercase letters) Your procedure should return the value 0 if the string is a palindrome, and the first integer i such that ai 6=an−i+1 if the string is not a palindrome.
2. Show all steps taken by your algorithm if you input the string the string abcdba. What number does the procedure return?
3. Show all steps taken by your algorithm if you input the string the string azyza. What number does the procedure return?
In: Computer Science
#1 a. When to use an Interface vs when to use an abstract class. For each “when” provide extended example(s) (with class/interface codes). b. Suppose you have an interface Moveable. Think of some interface that can extend it. Implement this two interfaces. (java oop)-> laboratory work
In: Computer Science
In: Computer Science
As we move closer to choosing tools for data mining it is important to understand what you intend to do with a specific tool.
a. In your own words, describe why you would choose a tool to:
- Predict unknown or future value
- Describe with interesting, interpretable patterns
b. In your own words, briefly describe these data mining techniques:
- Regression (predictive)
- Association Rule Discover (descriptive)
- Classification (predictive)
- Clustering (descriptive)
In: Computer Science
Match each function type correctly.
Question 1 options:
|
|
In: Computer Science
C++ UNIX
car.txt
0001|Mercury|LeSabre|2005|Brown|11000|2019-09-01
0002|Chevrolet|Aveo|2013|Blue|12000|2019-09-02
0003|Datsun|240Z|1979|Orange|13000|2019-09-03
0004|Ford|Galaxie|1964|Black|14000|2019-09-04
0005|Porsche|Boxster|2014|Green|15000|2019-09-0
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
const int RECORDS = 42;
ifstream reader("car.txt");
if(!reader) {
cout << "Error: cannot open
input file" << endl;
return -1;
}
string item[RECORDS];
int i = 0;
while(!reader.eof()) {
if((i+1) % 7 == 0)
getline(reader,item[i++],'\n');
else
getline(reader,item[i++],'|');
}
i = 0;
while(i < RECORDS) {
cout << "(1) carID= "
<< item[i++] << endl;
cout << "(2) carManufacturer=
" << item[i++] << endl;
cout << "(3) carModel= "
<< item[i++] << endl;
cout << "(4) carYear= "
<< item[i++] << endl << endl;
cout << "(5) carColor= "
<< item[i++] << endl << endl;
cout << "(6) carPrice= "
<< item[i++] << endl << endl;
cout << "(7)
carInventoryDate= " << item[i++] << endl << endl;
}
reader.close();
return 0;
}
this is my code to read that text file.
and output should be
(1) carID=0001
(2) carManufacturer=Mercury
(3) carModel=LeSabre
(4) carYear=2005
(5) carColor=Brown
(6) carPrice=11000
(7) carInventoryDate=2019-09-01
and so on.
but my output is
(1) carID= 0001
(2) carManufacturer= Mercury
(3) carModel= LeSabre
(4) carYear= 2005
(5) carColor= Brown
(6) carPrice= 11000
(7) carInventoryDate= 2019-09-01
like this. I don't know why there is space between 4, 5, 6, 7
please help me to fix
Thank you
In: Computer Science