Questions
What are three incidences in which animations or transitions may be appropriate in a business presentation...

What are three incidences in which animations or transitions may be appropriate in a business presentation and then three cases in which you think they'd be too much?

In: Computer Science

Using c++ Im trying to figure out a good user validation for this loop. So that...

Using c++

Im trying to figure out a good user validation for this loop. So that if a valid number is not input, it gives an error message. I have the error message printing but its creates an infinite loop. Need some help.

double get_fahrenheit(double c){

    double f;

    f = (c * 9.0) / 5.0 + 32;

    return f;  

}

#include "question2.h"

#include<iostream>

#include<string>

using std::cout; using std::cin; using std::string;

int main()

{

    

    double c;

    double f;

    double user_exit = 444;

    do{

        cout<<"Enter Celsius (Enter 444 to exit)\n";

        cin>>c;

        if(cin.good()){

             f = get_fahrenheit(c);

             cout<<c<<" degrees celsius is "<<f<<" degrees fahrenheit. \n\n";

            break;

        }else {

            cout<<"Invalid Input! Please input a numerical value. \n";

            cin.clear();

        }

    }while(c != user_exit);

    cout<<"Goodbye!";

    

    

    

    return 0;

}

In: Computer Science

Can somebody explain me what this code does in a few or one sentence? #include <iostream>...

Can somebody explain me what this code does in a few or one sentence?

#include <iostream>
#include <vector>
using namespace std;

int main () {
   const int NUM_ELEMENTS = 8;
   vector<int> numbers(NUM_ELEMENTS);
   int i = 0;
   int tmpValue = 0;

   cout << "Enter " << NUM_ELEMENTS << " integer values..." << endl;
   for (i = 0; i < NUM_ELEMENTS; ++i) {
       cout << "Enter Value#" << i+1 << ": ";
       cin >> numbers.at(i);
   }
   for (i = 0; i < (NUM_ELEMENTS /2); ++i) {
       tmpValue = numbers.at(i);
       numbers.at(i) = numbers.at(NUM_ELEMENTS - 1 - i);
       numbers.at(NUM_ELEMENTS - 1 - i) = tmpValue;
   }
   system ("pause");
   return 0;
}

In: Computer Science

how do i group in power point

how do i group in power point

In: Computer Science

Write a C program to take two integer arrays in ascending order and combine them in...

Write a C program to take two integer arrays in ascending order and combine them in a new array in descending order. Remove any duplicates in the final array, if any. Your code must store the arrays as a linked list of objects, each put in a “struct.” All operations should also be carried out using linked lists.

Input: 2 sorted arrays, each on a new line.

Output: An array sorted in descending order, without duplicates.

There is a single white space after each number, even after the last number. There is no new line at the end. Use the following struct as a reference:

struct ELEMENT {

int value;

struct ELEMENT *next;

};

=== Sample test case 1 ===

Input:

2 15 18 34 67 87 88

3 8 18 33 67 89 91

Output:

91 89 88 87 67 34 33 18 15 8 3 2

=== Sample test case 2 ===

Input:

28 36 57 59 68 69 420

17 37 57 59 68

Output:

420 69 68 59 57 37 36 28 17

In: Computer Science

1.Read the Lab6-Background.pdf first.2.Start the “Stack Queue” applet.3.The purpose of this exercise is to see how...

1.Read the Lab6-Background.pdf first.2.Start the “Stack Queue” applet.3.The purpose of this exercise is to see how you could reverse a list of names. Push the three names “Alice,” “Bob,” and “Charles” onto the stack. When you pop the stack 3 times, what do you see in the text field next to “Pop”?4.Write an algorithm in pseudo-codethat would describe how to use a stack to reversea sequence (list)of letters and print them. For instance, if the original sequence is COMPUTERthe output will be RETUPMOC. Review pages 249-250 of the textbook(Chapter8)to see the related sample pseudo-codes.5.A palindrome word is one that has the same sequence of letters if you read it from right to left or left to right(e.g., radar or madam). Describe (in terms of a pseudo-code) how you could use a stack in conjunction with the original listto determine if a sequence is a palindrome.Hint:Given that the letters have been already assigned to both stackand the queueand these two data structures are ready to be processed (compared).

In: Computer Science

Given: os.startfile() literally opens that file in windows is there such a way as to literally...

Given:

os.startfile() literally opens that file in windows

is there such a way as to literally save it withouthaving to manually do it?
(on windows)

this is in python

In: Computer Science

UPDATE: Whole Code How do I fix this Bold part "!= Null" ? its showing me...

UPDATE: Whole Code

How do I fix this Bold part "!= Null" ? its showing me Error? please Help

#include<iostream>
#include<string>
#include<string.h>
#include<fstream>
#include<stdlib.h>
#include<sstream>


using namespace std;

int main(){

string list[1000];
cout << "! Opening data file... ./Data.CS.SFSU.txt\n";
ifstream fin("Data.CS.SFSU.txt");
if(fin.fail()){
cout << "Error opening file\n";
return 0;
}
cout << "! Loading data...\n";
int count = 0;
while(getline(fin,list[count])!=NULL){
//cout << "--------------------\n";
count++;
}

cout << "! Loading completed...\n";
fin.close();
cout << "! Closing data file... ./Data.CS.SFSU1.txt\n";
cout << "-----DICTIONARY 340 C++-----\n";
while(true){
cout << "Search:";
string line;
getline(cin,line);
cout << "|" << endl;
stringstream ss(line);
  
string word1, word2, word3;
ss >> word1 >> word2;
if (ss >> word3 || (word2 != "noun" && word2 != "adjective" && word2 != "verb")){
cout << "Please enter a search key (and a part of speech)\n";
}
else {
for (int i = 0; i<word1.length(); i++){
word1[i] = tolower(word1[i]);
}
int found = 0;
cout << count << endl;
  
for (int i = 0; i< count; i++){
char line2[200];
strcpy(line2, list[i].c_str());
char *ch = strtok(line2,"|");
//cout << ch << endl;
while (ch != NULL){
//cout << ch << endl;
//cout << ch1 << " " << endl;
if (strcmp(ch,(char *)word1.c_str()) == 0){
ch = strtok(NULL,"|");

char line[100];
strcpy(line, ch);
char *ch1 = strtok(line," ");
//cout << line << endl;
if (strcmp(ch1,word2.c_str()) == 0){
ch1 = strtok(NULL," ");
ch1 = strtok(NULL," ");
string s ="";
while (ch1 != NULL){
s = s + ch1 + " ";
ch1 = strtok(NULL," ");
}
cout << word1 << "[" << word2 << "] :" << s << endl;
found = 1;
break;
}
}
ch = strtok(NULL,"|");
}
if (found == 1)
break;
}
if (found == 0)
cout << "Not found\n";
}
cout << "|" << endl;
  
}
return 0;
}

In: Computer Science

Instructions: 1. Implement SSL on a local computer. 2. Execute the email application using a secure...

Instructions:

1. Implement SSL on a local computer.

2. Execute the email application using a secure connection.

In: Computer Science

Could i get a walk trough how to solve these questions. Note that   is where the...

Could i get a walk trough how to solve these questions. Note that   is where the answer is meant to go.

Question 1

Say, instead of a separate variable (nItems), the number of items currently in the list are stored at index 0 in the array data, the actual values being stored starting at index 1. Complete the constructor that instantiates a list that can hold n values (excluding the item that holds the number of items currently in the list). That is, one should be able to add n values to the list before the need to grow it.

public class PackedArrayList {
public int[] data;

public PackedArrayList(int n) {
data = new int[  ];
data[0] =  ;
}
}

Question 2

Complete the body of method addEnsureCapacity in the following code:
public class MyArrayList {
public int[] data;
public int nItems;
public MyArrayList(int n) {
data = new int[n];
nItems = 0;
}
public void grow() {
//assume it increases capacity by 10
}
public boolean isFull() {
return (nItems == data.length);
}
public void addBasic(int val) {
data[nItems] = val;
nItems++;
}
public void addEnsureCapacity(int val) {
if(  == false) {
 ;
}
else {
 ;
addBasic(val);
}
}
}

In: Computer Science

Assume a file containing a series of words is named words.txt and exists on the computer’s...

Assume a file containing a series of words is named words.txt and exists on the computer’s disk. Write a program that reads the data and counts the number of occurrences of each letter. The program should then displays how many times each letter appears in the sentence.

In: Computer Science

Review 19 In the discussion of TCP splitting in the sidebar in section 3.7  it was claimed...

Review 19 In the discussion of TCP splitting in the sidebar in section 3.7  it was claimed that the response time with TCP splittting is approximately 4 *  RTTFE +RTTBE + processing time. Please Justify this claim                                                                                                                 

Jim Kurose and Keith Ross,”Computer Networking – A Top-Down Approach”, Addison-Wesley, Seventh Edition, 2017. ISBN-13: 978-0-13-359414-0

In: Computer Science

In Python: Define a function drawCircle. This function should expect a Turtle object, the coordinates of...

In Python:

Define a function drawCircle. This function should expect a Turtle object, the coordinates of the circle’s center point, and the circle’s radius as arguments. This function should draw the specified circle. The algorithm should draw the circle’s circumference by turning 3 degree and moving a given distance 120 times. Calculate the distance moved with the formula 2.0*π*radius/120.0.

In: Computer Science

Write a complete C++ program that prompts the user for the price of the prix fixe...

Write a complete C++ program that prompts the user for the price of the prix fixe menu choice. The program should then prompt the user for the number of guests in the party. The program should then calculate the bill including tax and tip then print the results to the console in the form of a receipt

For C++ Programming (I need it for C++ without using importing from java.)

In: Computer Science

This is Java programing. Complete Java program to produce the following output. interface Register{   void course();  ...

This is Java programing. Complete Java program to produce the following output.

interface Register{  
void course();  
}  


public class Interface1{  
   public static void main(String args[]){  
     Register c=new A();
     c.course();
     Register s=new B();
     s.course();  
   }
}  

//output

I'm taking A

I'm taking B

In: Computer Science