Questions
Develop a set of test cases for the algorithm In a scheduling program, we want to...

Develop a set of test cases for the algorithm In a scheduling program, we want to check whether two appointments overlap. For simplicity, appointments start at a full hour, and we use military time (with hours 0–24). The following pseudocode describes an algorithm that determines whether the appointment with start time start1 and end time end1 overlaps with the appointment with start time start2 and end time end2.

If start1 > start2

s = start1

Else s = start2

If end1 < end2

e = endl

Else e = end2

If s < e

The appointments overlap.

Else The appointments don’t overlap.

Trace this algorithm with an appointment from 10–12 and one from 11–13, then with an appointment from 10–11 and one from 12–13.

In: Computer Science

(C LANGUAGE) Write a function called upperLower that inputs a line of text into char array...

(C LANGUAGE) Write a function called upperLower that inputs a line of text into char array s[100]. Output the line in uppercase letters and in lowercase letters

This is what I have so far:

void * upperLower (const char * s) {
char *word[sizeof(s)];
for(int i = 0; i < sizeof(s); i++){
*word[i] = s[i];
}
word = strtok(word, " ");

int counter = 0;
while(word != NULL){
if(counter % 2 == 0){
word[counter] = toupper(word);
printf("%s ", word);
}
else{
word[counter] = tolower(word);
printf("%s ", word);
}
counter++;
word = strtok(NULL, " ");
}
}

The method cannot be changed. Must use void * upperLower (const char * s) {

The output should be like THIS is A test

In: Computer Science

Design the logic for a program that allows a user to enter 10 numbers, stores the...

Design the logic for a program that allows a user to enter 10 numbers, stores the numbers in an array, then displays all of the numbers, the largest number, and the smallest.

 create a solution algorithm using pseudocode

 create a flowchart

In: Computer Science

problem should be done in C++ read in the adjacency matrix for a graph (with 5...

problem should be done in C++

read in the adjacency matrix for a graph (with 5 vertices) from a file, "adjacency.txt".  An example file is here:  adjacency.txt

This example file contains the following matrix:

1 2 4 1 0
2 0 1 1 3
4 1 2 1 0
1 1 1 0 1
0 3 0 1 3

Store the information in a 2D array.
to return the degree of a vertex in a generic graph.

For example, the following : 

cout << "vertex 3's degree:  " << vertexDegree(G,3) << endl;
cout << "vertex 4's degree:  " << vertexDegree(G,4) << endl;

should output:

vertex 3's degree: 4
vertex 4's degree: 10

thanks!

In: Computer Science

Decrypt as many letters and words as you can in the cipher text listed below. You...

Decrypt as many letters and words as you can in the cipher text listed below. You don’t need to explain, only bullet list the steps in the order that you take to decrypt this cipher-text.

Caesar cipher

ZQHCFWPFHPBFIPBQWKFABVYYDZBOTHPBQP

QJTQOTOGHFQAPBFEQJHDXXQVAV

XEBQPEFZBVFOJIWFFACFCCFHQWAUVWFLQH

GFXVAFXQHFUFHILTTAVWAFFAW

TEVOITDHFHFQAITIXPFHXAFQHEFZQWGFLVWPTHFTDPTOGHFQPBQWAQJJTODXQHFOQPWTBDHHIXQVA

In: Computer Science

Consider the following checkSum() method where N numbers are saved in an array (as sorted in...

Consider the following checkSum() method where N numbers are saved in an array (as sorted in as-
cending order). In the main() function, the user will input a number. The checkSum() method will

find out whether the sum of any two numbers in the array is equal to the given number by the user. You
need to solve the problem with minimum time complexity (low complexity will lead to higher marks!).

In: Computer Science

the college wants to keep track of the semester schedules across years. i.e. Departments, their Courses...

the college wants to keep track of the semester schedules across years. i.e. Departments, their Courses as they exist in the College catalog, and the course section offerings across the years and their semesters. From a catalogue perspective:

A department has a unique name (Finance, Management and Marketing, Math, ABC-Law, etc.) and offers multiple courses.

A course has a unique name, which is a hyphenated prefix-Number like (BUAN-310, CIS-205, FIN315, MATH-153, etc.), a long name like “principles of Data management”, a long description and a number of credit (leave prerequisites out for now).

During any given semester (Fall, Spring, Summer-1, Summer-2, Winter), Zero-Or-More-sections of a given course are offered. For example, For BUAN-227 and for the Fall of 2019, 4 sections (1, 2, 3 and 61, I made it up) were offered.

Each section has a CRN, which is a unique identifier and a capacity to indicate the max number of students that can sign-up for the course (Leave time and room out for now).

We leave students who register for courses out for now

Your reverse engineered schema looks similar

Write the SQL code that creates the tables and enforces Primary and foreign key constraints.

Your SQL Code Goes Below:


#All Fields are required

#It is your call if any of the fields is Unique.

use ……..; #Your database Schema Name instead

SET FOREIGN_KEY_CHECKS=0;

DROP TABLE Department CASCADE;

Create TABLE Department (

…….

);

#

DROP TABLE Course CASCADE;

CREATE TABLE Course(

…….

);

#

DROP TABLE CourseSection CASCADE;

CREATE TABLE CourseSection(

…….

);

#

SET FOREIGN_KEY_CHECKS=1;

Insert 5-Department Records into the Department table. Your SQL Code Goes Below:

Enter 10 Courses into the Course table; make sure you assign them to different departments. Your SQL Code Goes Below:

Enter 20 course-sections into the courseSection table across different years and semesters. No more than 3 course sections for a given year and a given semester. Your SQL Code Goes Below:

MY SQL workbench

In: Computer Science

in java pls Write a program for spiritual lumberjacks who want to show their appreciation for...

in java pls

Write a program for spiritual lumberjacks who want to show their appreciation for each tree they 'kill' by celebrating its years of life.

  1. Ask the lumberjack how many trees he wants to cut. Verify you got the number correctly by printing it to output.

  2. Write a loop that iterates over all the trees the lumberjack wants to cut down. Print the tree number to the screen to make sure your loop is working correctly.

  3. Query the lumber jack for how many rings are in this tree and print this number to make sure you got the correct number of rings.

  4. Write an inner loop that iterates over the years of the tree. Print each year to make sure you are iterating correctly and hitting each year that it lived.

  5. Change the necessary print statements and to match the correct formatting from the output examples.

input: 2 3 4

expected output:

How many trees do you want to cut down?

2

0

How many rings are in tree 0?

3

We humbly respect tree number 0 and celebrate its 1 birthday.

We humbly respect tree number 0 and celebrate its 2 birthday.

We humbly respect tree number 0 and celebrate its 3 birthday. 1

How many rings are in tree 1?

4

We humbly respect tree number 1 and celebrate its 1 birthday.

We humbly respect tree number 1 and celebrate its 2 birthday.

We humbly respect tree number 1 and celebrate its 3 birthday.

We humbly respect tree number 1 and celebrate its 4 birthday.

In: Computer Science

In C++ Complete the following code without the use of auto. Write a function, getAverages, that...

In C++

Complete the following code without the use of auto.

  1. Write a function, getAverages, that will prompt the user for a series of exam averages for an unspecified number of students in a class. The user should enter a negative exam average to indicate the end of data. Exam averages should be stored in the vector indicated by the reference parameter.
  2. Write a function, storeAverages, that will accept two parameters, a vector containing exam averages and a string containing the name of a file. The function should store the averages to the file specified in the filename parameter, one average per line. If a file with that filename already exists, its contents should be overwritten. The function should not be able to modify the averages stored in the vector. This function should use the range-based for loop.
  3. Write a function, curveAverages, that will accept two parameters, a vector containing exam averages to be curved and a floating-point number which should be added to each average. The function must be able to modify the averages in the vector. The function should use a regular for loop and the at() member function.
  4. Write a function, calculateClassAverage, that will accept a single parameter, the vector containing the students' exam averages. The function should compute and return the average of the class' exams. The function should not be able to modify the averages stored in the vector.
  5. Include code in the main that will allow the user to specify the exam averages, the number of points to curve each average and a file name for storing the averages. The code should curve the averages, calculate the class average, which should then be displayed to the screen, and then store the exam averages in the file specified by the user.

In: Computer Science

Flow chart and IPO chart ( no handwritten please ) #include <stdio.h> #include <string.h> #include <conio.h>...

Flow chart and IPO chart ( no handwritten please )

#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>

char vs[26][26];

void encrypt(char input[], char key[], char cipher[]) {

char inputWithoutSpaces[50], repeatedKeyWord[50], tempCipher[50];

int cnt = 0, i = 0, keyLen = strlen(key), len3 = strlen(input);

// loop to remove the spaces from input & store in other char array inputWithoutSpaces
for (i = 0; i < len3; ++i) {
if (input[i] != ' ') {
inputWithoutSpaces[cnt++] = toupper(input[i]);
}
}
inputWithoutSpaces[cnt] = '\0';

int len1 = strlen(inputWithoutSpaces);

// loop to repeat the key until it becomes equal to the length of input without spaces
i = 0;
while (i < len1) {
repeatedKeyWord[i] = toupper(key[i % keyLen]);
i++;
}
repeatedKeyWord[i] = '\0';


// form the temp cipher
for (i = 0; i < len1; ++i) {
tempCipher[i] = vs[inputWithoutSpaces[i] % 'A'][repeatedKeyWord[i] % 'A'];
}

tempCipher[i] = '\0';

// modify the passed cipher by adding spaces in temp cipher wherever needed
cnt = 0;
for (i = 0; i < len3; ++i) {
if (input[i] == ' ')
cipher[i] = ' ';
else
cipher[i] = tempCipher[cnt++];
}
cipher[i] = '\0';


}

void decrypt(char cipher[], char key[], char plaintext[]) {

printf("%s\n", key);
char cipherWithoutSpaces[50], repeatedKeyWord[50], tempPlainText[50];

int cnt = 0, i = 0, keyLen = strlen(key), len3 = strlen(cipher);

// loop to remove the spaces from cipher & store in other char array cipherWithoutSpaces
for (i = 0; i < len3; ++i) {
if (cipher[i] != ' ') {
cipherWithoutSpaces[cnt++] = toupper(cipher[i]);
}
}
cipherWithoutSpaces[cnt] = '\0';

int len1 = strlen(cipherWithoutSpaces);

// loop to repeat the key until it becomes equal to the length of input without spaces
i = 0;
while (i < len1) {
repeatedKeyWord[i] = toupper(key[i % keyLen]);
i++;
}
repeatedKeyWord[i] = '\0';

// form the temp plaintext
cnt = 0;
for (i = 0; i < len1; ++i) {
for (int j = 0; j < 26; ++j) {
if (vs[repeatedKeyWord[i] % 'A'][j] == cipherWithoutSpaces[i])
tempPlainText[cnt++] = 'A' + j;
}
}
tempPlainText[cnt] = '\0';

// modify the passed plaintext by adding spaces in temp plaintext wherever needed
cnt = 0;
for (i = 0; i < len3; ++i) {
if (cipher[i] == ' ')
plaintext[i] = ' ';
else
plaintext[i] = tempPlainText[cnt++];
}
plaintext[i] = '\0';

}

int main(void) {

char selection;

char plaintext[50], cipher[50], key[10];

// making the table
for (int i = 0; i < 26; ++i)
for (int j = 0; j < 26; ++j)
vs[i][j] = ('A' + ((i + j) % 26));

// taking first selection
fflush(stdin);
printf("Enter e for encryption, d for decryption, x for exit: ");
scanf("%c", &selection);
  
// run loop till user enters 'x'
while (selection != 'x') {

// condition for encryption
if (selection == 'e') {

// taking plaintext
fflush(stdin);
printf("Enter the plaintext: ");
scanf("%50[a-zA-Z ]", plaintext);

// taking key
fflush(stdin);
printf("Enter the key: ");
scanf("%50[a-zA-Z ]", key);

// encrypting and displaying cipher
encrypt(plaintext, key, cipher);
fflush(stdin);
printf("Cipher text: %s\n\n", cipher);
}
else {

// taking encrypted text
fflush(stdin);
printf("Enter the encrpted text: ");
scanf("%50[a-zA-Z ]", cipher);

// taking key
fflush(stdin);
printf("Enter the key: ");
scanf("%50[a-zA-Z ]", key);

// decrypting and displaying plain text
decrypt(cipher, key, plaintext);
fflush(stdin);
printf("Plain Text: %s\n\n", plaintext);
}

fflush(stdin);
printf("Enter e for encryption, d for decryption, x for exit: ");
scanf("%c", &selection);
}

return 0;
}

In: Computer Science

in one page answer questions below Enterprise architecture (EA) at American Express was the framework the...

in one page answer questions below


Enterprise architecture (EA) at American Express was the framework the organization used to align IT and the business. EA provided a common language for leaders to use to collaborate and transform the business. At American Express, enterprise architects were the change agents who streamlined processes and designed ways to more effectively do business using IT resources. In 2011, American Express was named an InfoWorld/Forrester Enterprise Architecture Award recipient for its EA practices. As American Express leaders considered new payment methods using mobile devices, the EA guided their progress.

Mobile payments were forcing the payments industry to review their practices and significantly transform the way business was done. The new business environment introduced additional complexity with the addition of new delivery channels and the need for shorter time‐to‐market of payment products and services. American Express’s business strategy for its payments products focused on delivering a “consistent, global, integrated customer experience based on services running on a common application platform.”

To achieve this goal, the EA team created reference architectures and road maps for standardized applications across the firm. This team then worked with multiple business solution delivery teams to create and manage the common application architecture and create strategies that facilitated each business’s objectives. Each strategy included a road map of initiatives that included a set of actions, the metrics to evaluate the success of these actions, and the commitments IT and the businesses made to make it happen. The road map was American Express’s way to standardize language, tools, life cycle management of the applications, and architecture and governance processes. The elements of the road map included technology, reference architecture, and capabilities for the business.

The next steps for American Express were to extend the road maps to cover the maturing of SOA and to develop new reference architectures and a new taxonomy to increasingly align IT with the needs of the business. As new technologies emerged and new ways of doing business over social tools created opportunities for new payment products and services, American Express expected to continually evolve its EA.

Discussion Questions

1. What are the key components of the architecture American Express has created?

2. Why was it important to standardize so much of the architecture? What are the advantages and disadvantages of a standard EA for American Express?

In: Computer Science

Create a use case diagram for the following system. Attach a WORD file with the diagram....

Create a use case diagram for the following system. Attach a WORD file with the diagram.

UVA Chatbot

Chatbot is a computer program powered by AI that allows business to interact with the customers via a chat interface. Assume you are working on a project to develop a Chabot that will provide student services for ODU. The Chabot you are working on has the following functions:

Gathering Information

When a student initiates a conversation, there are some formalities to go through before help is provided. Chatbot will be used to gather the preliminary information (e.g., UIN, name) and verify the student.

After that, Chatbot passes the information to a human advisor and connects the student to the advisor who will helps the student.

Providing Help

The Chabot uses natural language processing (NLP) to understand what the student asks for and searches existing knowledge base (system) to answer the questions (e.g. how to schedule exams in the test center? ).

Feedback Collection

The student will be asked to leave feedback of the service, which is comprised of a text message and a rating. The system administrator should be able to view and delete feedbacks.

Develop a use case narrative/specification for one of the use cases "Provide help" of the system in question 6. Attach a word file. Include use case name, actor, pre- and post-conditions, basic flow, and alternative flow. The use case narrative should include your design of the detail interactions between the actor and the system for one process (use case) only, do not put the whole system processes into the narrative.

In: Computer Science

IN JAVA PROGRAMMING Write a complete Java program to do the following: a) Prompt the user...

IN JAVA PROGRAMMING

Write a complete Java program to do the following:

a) Prompt the user to enter a six-digit integer.

b) Take the integer and break it up into two pieces of three-digits each (make sure you keep the order of digits).

c) Display each 3-digit piece on a separate line with a proper message before each piece.

For example, if the user enters  450835 as the integer, then the program should display the following output:

Right 3-digit piece: 835

Left 3-digit piece: 450

In: Computer Science

Discuss how the OSI model has been able to allow different technologies to communicate over the...

Discuss how the OSI model has been able to allow different technologies to communicate over the years. Mention at least two specific networking technology that did not exist 40 years ago that is currently used today, such as e-mail.

In: Computer Science

List three jobs in which working from home is infeasible. Explain why remote work doesn’t work...

List three jobs in which working from home is infeasible. Explain why remote work doesn’t work for everyone.

In: Computer Science