Questions
Information Systems Business Risks"   Identify the risks related to information systems and suggest ways to minimize...

Information Systems Business Risks"  

Identify the risks related to information systems and suggest ways to minimize them.

Describe Quality Assurance and Quality Control. Discuss their roles in information systems.

In: Computer Science

WRITE IN PERL Creating a Perl Product Directory - A product "id" will be used to...

WRITE IN PERL

Creating a Perl Product Directory - A product "id" will be used to identify a product (the key) and the description will be stored as the value

  • The program should print a menu asking you to "add" an entry, "remove" an entry, "lookup" an entry, "list" all entries, and "quit" to end
  • The user will enter a number to select the menu item from above, 1, 2, 3, 4, or 5 respectively.
  1. Asks the user to enter a product ID, then asks them to enter a description... the product ID is stored as the key of a hash and the description is the value
  2. Asks the user to an ID, if that ID exists in the hash, that entry is deleted from the hash
  3. Asks the user to an ID, if that ID exists in the hash, that entry's value is printed (the description)
  4. Prints all the key/value pairs of the hash, each entry on a new line with with a colon or dash separating the ID from the description
  5. Exits the program
  • The program will continuously loop, that is, it will print the menu after each successful action... unless the user chooses 5 to quit, which will end the program. This can be achieved by either using a "while" loop or by using a subroutine that prints the menu after each successful action

Here is a template:

#!/usr/bin/perl
use warnings;

%products = (); # empty hash to store products in

sub getChoice(){
print("Welcome to the Product Directory\n");
print("1. Add a Product to Directory\n");
print("2. Remove a Product from Director\n");
print("3. Lookup a Product in Directory\n");
print("4. List all products\n");
print("5. Quit\n");
print("Enter your option: ")
chomp($choice = <STDIN>);
return $choice
}

$c = getChoice();
while($c ne "5"){
if($c eq "1"){
# Ask the user to enter input for a product's ID
# Ask the user to enter input for a product's description
# Add the item to the hash with the supplied ID as the key and description as the value
}
  
# Options 2 - 4
}

In: Computer Science

PYTHON    Generates a list of datetimes given a list of dates and a list of...

PYTHON   

Generates a list of datetimes given a list of dates and a list of times. All possible combinations of date and time are contained within the result. The result is sorted in chronological order.

For example,
Input:
>>> timetable([date(2019,9,27), date(2019,9,30)], [time(14,10), time(10,30)])
Output:
[datetime(2019,9,27,10,30), datetime(2019,9,27,14,10), datetime(2019,9,30,10,30), datetime(2019,9,30,14,10)]

Current code:

from datetime import date, time, datetime

def timetable(dates, times):

lis = []
  
for c in times:
for y in dates:
x = f"(datetime{y},{c})"
lis.append(x)

#doesn't work at all

In: Computer Science

Write a program that inputs the values of three Boolean variables, a, b, and c, from...

Write a program that inputs the values of three Boolean variables, a, b, and c, from a “cin” operator (user gives the values be sure to prompt user for what they have to give!). Then the program determines the value of the conditions that follow as true or false. 1. !(a&&b&&c) && ! (a||b||c) 2. !(a||b)&&c Output should include the values of a,b,c ie 0 or 1 in the patterns that follow reflecting the Boolean logic being tested. Where “True” or “False” are in string variables. Study this example! for input of a=1 and b =0 and c=1 results in output looking like !( 1&&0&&1) && !(1|| 0||1) is False !(1||0)&&1 is False Run for the eight cases of a,b,c in Table 3.2 (both editions of text) Warning follow this output example format else you will have to redo it! Hint: your output statements will be large! Hint:. you have to use strings and variables for parts like<< “!(<

In: Computer Science

Write a program that concatenates the characters in a two-dimensional into a set of Strings in...


Write a program that concatenates the characters in a two-dimensional into a set of Strings in a
one-dimensional array as described below.
main
#Request and Read in the number of rows of a two dimensional array.
#Create the reference to the two-dimensional array.
For each row
#Request and Reads in a line of text
#Based on the length of the line create a row with the correct number of columns (look
#back to lesson 3)
#Place each character for the String into the row, one character at a time.
#Call concatenateColumnsPerRow with a reference to the character two-dimensional array as a
#reference. The return will be a reference to a one-dimensional String array.
#Call displayArray with a reference to the one-dimensional StringArray.
concatenateColumnsPerRow
#Accepts a character two-dimensional array reference as input.
#Concatenates the elements in each row into a String.
#Returns a one-dimensional String array, with the Strings from each row placed into the
#corresponding row in the String array.
displayArray
#Accepts the one-dimensional String array and prints out the Strings on separate lines

In: Computer Science

Hi i need a c++ program that can convert charactor into numbers pseodocode user input their...

Hi i need a c++ program that can convert charactor into numbers

pseodocode

user input their name

for example john

every single charactor should have a value so it return correct result

eg:

j=2, o=1, h=7,n=2

and display these numbers

if you may need any question to ask me, i will be very happy to answer them.

Thanks!

example project close but not accurate

#include<iostream>
#include<string>
#include<exception>
#include <cstdlib>
#include<stdio.h>
#include<map>
#include <cctype>
#include<Windows.h>
#define INPUT_SIZE 8

using namespace std;

// Function to reverse a string
void reverseStr(string& str)
{
   int n = str.length();

   // Swap character starting from two
   // corners
   for (int i = 0; i < n / 2; i++)
       swap(str[i], str[n - i - 1]);
}
int main() {
   const std::string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

   std::string text;
   std::cin >> text;

   // convert all lower case characters to upper case
   for (char& c : text) c = std::toupper(c);

   // sum up the values of alpha characters ('A' == 1, 'B' == 2 etc.)
   int sum = 0;
   for (char& c : text) // for each character c in text
   {
       // locate the character in alpha
       // http://www.cplusplus.com/reference/string/string/find/
       const auto pos = alpha.find(c);

       if (pos != std::string::npos) // if found (if the character is an alpha character)
                                   // note: non-alpha characters are ignored
       {
           const int value = pos + 1; // +1 because position of 'A' is 0, value of 'A' is 1
           sum += value;
           cout << sum;
       }
   }

In: Computer Science

The following pieces of information need to be stored in variables. List the best data types...

The following pieces of information need to be stored in variables. List the best data types to use for the variables.

Information to store

Best data type

Street address

Average rainfall

Machine error count

In: Computer Science

This C++ program is to validate the ISBN number and output "Valid" if the number is...

This C++ program is to validate the ISBN number and output "Valid" if the number is valid, and "Invalid"
otherwise.


The ISBN number for a book is a 10-digit number made up of 4 sections separated by '-'. In the ISBN
number 1-214-02031-3:
1 represents a country (must be 1 digit)
214 represents the publisher (must be 3 digits)
02031 represents the book number (must be 5 digits)
3 is the checksum (must be 1 digit or the letter 'x').
The checksum is a digit to see if the ISBN number is a valid number. If the checksum is 'x', then that
represents the digit 10.
A weight is associated with each digit:
10 with the first digit (1 in the example)
9 with the second digit (2 in the example)
8 with the 3rd digit (1 in the example)
7 with the 4th digit (4 in the example)
6 with the 5th digit (0 in the example)
5 with the 6th digit (2 in the example)
4 with the 7th digit (0 in the example)
3 with the 8th digit (3 in the example)
2 with the 9th digit (1 in the example)
1 with the 10th digit (3 in the example)
To check to see if an ISBN number is valid, you multiply the digit by its weight and add the resulting
products. If the sum is evenly divisible by 11, then it is a valid ISBN number.


In the example: 1-214-02031-3
1*10+2*9+1*8+4*7+0*6+2*5+0*4+3*3+1*2+3*1 = 88
Since 88 is evenly divisible by 11, the above number is a valid ISBN number.

The main function will create an array of pointers of type char to store all the ISBN numbers I'll give
you in a separate text file for the convenience of copying. The main should iterate over that array and for
each ISBN number call the function checkDigits which will return true is there are digits and a correct
number of digits in each section, and if each section is separated by a '-'. Otherwise, it will return false.
If checkDigits returns true, the main will call checkSum, which will return true if the sum of the
products of the weights and digits is divisible by 11. Otherwise, it returns false. The main program will
output "valid" or "not valid" for each ISBN number.

In this program, do not use subscripted variables. Use the pointers to the characters. The declaration for
the checkSum would be:
bool checkSum(char *);

Note that functions take a single pointer as a parameter, not a char ** (i.e. array of pointers).
Note, that *(ptrISBN + 3) is the same as ptrISBN[3]
To check to see if there is an '-' in the i-th position you can use the statement:
if(*(ptrISBN + i) == '-')
Your program should not be like that:
if(ISBN[0] == '-' || ISBN[1] == '-' || ISBN[2] == '-' ….. || ISBN[10] == '-')
To check for each element in the array.
I want you to use the loop and iterate over the arrays using the loop.

However, if you need to check just a couple (maybe three, max), that is OK.

Should use:

2 functions with using const arguments
Using enum valid, invalid in place of bool

Do not use:
Declaring array according to standards
off-by-one errors
Using global variables

Run the program with the data from the data file “test_data.txt”
Note, I want you to hard code the array of pointers. I don't want you to read the data from the file on
the fly.

------------------------------------------------------------------------------------------------------------------------------------------------------------

Expected output would be similar to the following:

Input ISBN numbers:

(input number from given .txt file)

Array filled! //use a loop to get input from the user

Checking ISBN numbers...

//(for ISBN #'s return False/Invalid)

Invalid ISBN #

//(for ISBN #'s return True/Valid)

Checking sum of Valid ISBN numbers

Valid/Invalid ISBN # : (return sum of ISBN number)

------------------------------------------------------------------------------------------------------------------------------------------------------------

Given text file: Note, I want you to hard code the array of pointers. I don't want you to read the data from the file on
the fly. IF applicable/possible try to make another function to show the difference.

1-214-02031-3
0-070-21604-5
2-14-241242-4
2-120-12311-x
0-534-95207-x
2-034-00312-2
1-013-10201-2
2-142-1223
3-001-0000a-4
done

In: Computer Science

write a function that accept an array and its size than return an array call modeAry...

write a function that accept an array and its size than return an array call modeAry that store the following information:    modeAry[0] = Number of modes; modeAry[1] = Frequency of the modes ; modeAry[>=2] = All the modes you found   ;        EXP:if the array input is [1,1,2,2,4,3,3], the function modAry should be [3,2,1,2,3]. In c++

In: Computer Science

Write a java code that takes 2 parameters input and output and and guesses value of...

Write a java code that takes 2 parameters input and output and and guesses value of 3 variables x,y,z for following equation:

output/input = (x)/(y*z)
and range of x = 2 to 512
and y and z = 2 to 32

for example public int method(int input, int output)
and input was 10 and output was 80
it'll return x=32 and y=2 and z=2.

In: Computer Science

WEEK 12 ASSIGNMENT: 1: Define project control 2: List and briefly describe the various project control...

WEEK 12 ASSIGNMENT:

1: Define project control

2: List and briefly describe the various project control techniques

3: Explain cost control and schedule indexes

4: Define project closure

5: Describe what is involved in project handover

In: Computer Science

Write a MATLAB program to simulate the FIFTY dice game that can automatically play the FIFTY...

Write a MATLAB program to simulate the FIFTY dice game that can automatically play the FIFTY dice game for any amount of players, keep scores for all the players, clearly show the game progress for every round, every player, and every roll in the command window, automatically ends the game when the first player accumulates 50 points or more game score, and automatically select the game winner and the winning game score.

i have coded most of the game, i need help with " any amount of players" how can i make the game work for as many players as user wants.

clc

clear

x1 = randi ([ 1,6],1);

x2 = randi ([ 1,6],1);

vec = [x1,x2];

s = sort (vec);

score =0;

round =1;

fprintf ('\tHello and welcome to your dice game!\n')

fprintf ('\tLets play, roll your dice !\n')

fprintf ('\tYou can choose as many players as you want!')

fprintf ('\t------------------------------------\n\n\n')

fprintf ('If you roll double 6, you get 25 points.\n')

fprintf ('If you roll a double 3 you go back to 0 points.\n')

fprintf ('Any other double other than 3, or 6, will get you 5 points.\n' )

fprintf ('The first to get to 50 points wins.\n')

%input = numOfPlayers ('enter how many players');

disp('Your dice numbers are: ')

disp (s)

fprintf ('This is the: %.f round \n and the score is: %.f \n First roll was: %.f\n and seccond roll was: %.f' ,round ,score ,x1 ,x2)

while score ~= 50;

if s(1) == 3 && s(2) == s(1) ;

disp (' youre score has gone back to 0')

score = 0;

elseif s(1) == 6 && s(2) == s(1)

disp ('You just got 25 points')

score= (score+25);

elseif s(1) == s(2);

disp ('You get 5 points !')

score = (score +5);

elseif score > 50

disp ('game is over you won your score is: %.f ! ',score)

else disp (' You did not get points, play again !')

end

if score ~= 50

x1 = randi ([ 1,6],1);

x2 = randi ([ 1,6],1);

vec = [x1,x2];

s = sort (vec);

round = round + 1;

fprintf('This is the: %.f round \n\t and the score is: %.f \n\t First roll was: %.f\n\t and seccond roll was: %.f' ,round ,score ,x1 ,x2 ) ;

end

end

fprintf('Your score is: %.f you won !', score);

In: Computer Science

Java please. No "hard coding" please. Need to ask for the file and load the sample...

Java please. No "hard coding" please. Need to ask for the file and load the sample file information into the class.

There is a complete theory about how queues work. In this problem create a limited model to study the order in which a bunch of customers will be attended by their cashiers on a supermarket. The conditions for the experiment are:

• Each cashier spends the same amount of time with each customer (this is just an exercise, not real life).

• There will be a defined number of queues but never less than 2 and never more than 5.

• There is a variable number of customers, never less than 1 and never more than 20 and they are identified by a letter (A, B, C, …)

• The customers are distributed randomly among the different queues. • If two customers are served at the same time, we would consider that they will be ordered following the queue number they are at (first will be customer in queue 1, second customer in queue 2)

Write a program to give the order in which the customers are attended, for example:

• There are 4 queues:

• Cashier number 1 spends 3 minutes on each customer

• Cashier number 2 spends 2 minutes on each customer

• Cashier number 3 spends 4 minutes on each customer

• Cashier number 4 spends 1 minutes on each customer

• Customers are distributed as follows:

• Queue 1 (Cashier 1): Customer A, customer E, customer I

• Queue 2 (Cashier 2): B, F, J, N

• Queue 3 (Cashier 3): C, G, L

• Queue 4 (Cashier 4): D, H, M, O, P, Q

With this input the customers will have been served in the following order and timing:

D (after 1 minute)

B (after 2 minutes on queue 2)

H (after 2 minutes on queue 4)

A (after 3 minutes on queue 1)

M (after 3 minutes on queue 4)

F (after 4 minutes on queue 2)

C (after 4 minutes on queue 3)

O (after 4 minutes on queue 4)

P (after 5 minutes)

E (after 6 minutes on queue 1)

J (after 6 minutes on queue 2)

Q (after 6 minutes on queue 4)

N (after 8 minutes on queue 2)

G (after 8 minutes on queue 3)

I (after 9 minutes)

L (after 12 minutes)

The input from a data file will have the number of queues on the first line, followed by the information for each queue, first the time spent by the cashier on a customer, the number of customers on a queue and then the order of the customers separated by a space.

Output to the screen the list of served customers ordered by the time spent in the queue separated by spaces.

Must use a queue data structure.

Refer to the sample output below.

Sample File: the following information is on the queues.txt file

4

3 3 A E I

2 4 B F J N

4 3 C G L

1 6 D H M O P Q

Sample Run:

Enter file name: queues.txt

The list ordered by time spent: D B H A M F C O P E J Q N G I L

In: Computer Science

Data mining--> Please Perform Principal Component Analysis and K-Means Clustering on the Give dataset Below. [50...

Data mining-->

  1. Please Perform Principal Component Analysis and K-Means Clustering on the Give dataset Below. [50 Points]

    Dataset Link : https://dataminingcsc6740.s3-us-west-2.amazonaws.com/datasets/homework_2.csv

    10 Points for Data Preprocessing.

    15 Points for PCA Algorithm along with plots and Results Explaination.

    15 Points for K-Means Algorithm with plots and Results Explination.

    10 Points for Comparing the results between PCA and K-Means and whats your infer- ence from your ouputs of the algorithms.

    Hints:
    As per the data preprocessing step convert all the variables in the dataset into Numerical

    values as the algorithms only work with Numerical values
    Then Apply both algorithms one after the other then plot the output clusters Compare the output clusters in both the steps.

In: Computer Science

Write an algorithm to describe how to convert a user input from ounces to grams, drams...

Write an algorithm to describe how to convert a user input from ounces to grams, drams and pounds. Use enough detail that you have between five and ten steps. List any assumptions.

         a) Assumptions

         b) Steps

In: Computer Science