C#
Write a console application that takes the following passage and removes every instance of the word "not" using StringBuilder and prints the result out to the console:
I do not like them
In a house.
I do not like them
With a mouse.
I do not like them
Here or there.
I do not like them
Anywhere.
I do not like green eggs and ham.
I do not like them, Sam-I-am.
Ensure that the resulting output reads normally, in other words, it must maintain the same line breaks and not include double-spaces where there should only be a single space. The output should be identical to this:
I do like them
In a house.
I do like them
With a mouse.
I do like them
Here or there.
I do like them
Anywhere.
I do like green eggs and ham.
I do like them, Sam-I-am.
In: Computer Science
C++
1. Write a function decimalToBinary() that takes in a positive integer as a parameter and use as stack to convert the integer to a its corresponding binary representation. Hint: divide the integer by 2.
2. A palindrome is a string of characters (a word, phrase, or sentence) that is the same regardless of whether you read it forward or backward—assuming that you ignore spaces, punctuation, and case. For example, Race car is a palindrome. So is A man, a plan, a canal: Panama. Write a function isPalindrome() that takes a string as a parameter and uses a stack to test whether a string is a palindrome.
3. Suppose that you read a binary string—that is, a string of 0s and 1s—one character at a time. Write a function that use a stack but no arithmetic to see whether the number of 0s is equal to the number of 1s. When these counts are not equal, show which character—0 or 1—occurs most frequently and by how much its count exceeds the other’s.
4. Write a program to test the four functions above.
In: Computer Science
In: Computer Science
•From the e-Activity, determine the type of cache memory (i.e., Level 1, Level 2, or another type) that resides on a computer that you own or on a computer that you would consider purchasing. Examine the primary manner in which the type of cache memory that you have identified interfaces with the CPU and memory on your computer. Determine which type of cache memory is the most efficient, and provide one (1) example that depicts the manner in which the use of one (1) type of cache memory makes your computer processing more efficient than another. •Evaluate the advantages and disadvantages of both symmetrical and master-slave multiprocessing systems in regards to computer processing speed, multiprocessing configuration, overheating, and cost. Of the two (2), recommend the type of processor that would be better suited for a computer that is primarily used for the following: Word processing, Microsoft Excel spreadsheets, and computer gaming. Provide a rationale for your response.
In: Computer Science
**I need to make this program to make sure that the numbers are unique. In another word, if the number has been generated and appear early, it should continue to find the next number until the number is unique.
Hint: use the array to check whether the number has been generated.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
srand(time(NULL));
int n, low, high;
cout << "Enter how many random numbers you would like to see: ";
cin >> n;
cout << "Enter the lower limit now: ";
cin >> low;
cout << "And now enter the higher limit: ";
cin >> high;
cout << n << " random numbers:";
for (int i = 0; i < n; ++i) {
cout << " " << low + (rand() % (high-low+1)) << endl;
}
cout << endl;
return 0;
}
Please show me how it can be done and explain code needed if possible. Thanks!
In: Computer Science
Write MIPS code for finding the (estimated) square-root of a number N, by using the following pseudo-code:
sqrt = N;
repeat 10 times {
sqrt = (sqrt + N/sqrt)/2;
}
The number N is entered by the user and the answer is displayed on the screen as (for example):
The square root of 121 is 11.
Write MIPS code for finding the distance between two points [x1,y1] and [x2,y2]. The formula for the distance is:
z = ?(x2 − x1)2 + (y2 − y1)2
x1,x2,y1 and y2 are entered by the user and the answer z is
displayed on the screen as
(for example):
The distance is 12.
(Hint: Reuse the square-root code from the previous question.
Write MIPS code that finds and prints the smallest number in the integer array “arr”. The declaration of the array is shown below:
.data
arr: .word 100, 10, 3, -2, 110, 0, -50, 150, -17, 8
In: Computer Science
In: Operations Management
think of two organizations, activities, clubs, etc. that you are involved in (or very familiar with). This can be a sports team, church group, school club or organization, job, etc.
Write a press release for 2 different organizations/groups based on an actual or hypothesized upcoming/ongoing event. You must choose two different groups/events and have two different press releases. The body of each release must be at least 300 words in length (headings that include your contact information are excluded from the word count). Yes, that means the total of your two submissions is at least 600 words in length!
Examples?
Health center opening or offerings
Emergency Management courses offered
Political candidacy announcement
School club fundraiser/community service event
Winning of sports championship
…..or whatever else real or fictitious you would like to use as your subject matter.
In: Operations Management
In: Operations Management
******Please don't use handwriting and i need unique answer ... Thank you
Q3:
Consider the following relation:
Student-Dept = (Student-ID, Course, SportActivity, Dept-Name, Building)
Having following multivalued dependencies:
F ={ Student-ID ®® Course
Student-ID ®® SportsActivity
Dept-Name ®® Building }
Explain in your own words why the Student-Dept relation is not in 4NF. Then, convert the Student-Dept relation in 4NF. Also, provide the justification for each step you perform during normalization (4NF). Note: The SportActivity here means any sport a student is participating in. For example, a student with ID = 123 can participate in soccer and badminton.
Q4:
In your own word, explain why do designers use Denormalization? What is the limitation of using Denormalization? Name and explain a better alternative approach than Denormalization.
In: Computer Science