Write a C++ program to perform 128-bit encryption and decryption using XOR operation.
Your program must ask for 128-bit key and plain text then perform encryption and decryption.
The information about colours is to be stored in bits of a variable called colour. The bit
number 0 to 7, each represent 8 colours of a rainbow, i.e. bit 1 represents Blue, 2 represents Green,
and so on (see table below). Write a C++ program that asks the user to enter a number and based on
this number, an eight lined rainbow (of asterisks *) is to be displayed, such that, if the bit is ON,
respective colour is displayed otherwise black line is drawn (not visible).
In a Military database system, IDs of the army personnel are stored in a 32-bit value
which is coded as follows:
a. 7-bits Belt number
b. 10-bits Batch number
c. 5-bits Log number
d. 10-bits Unit number
Your Task is to write a C++ Program which inputs a four-byte integer ID, and a string Name of the
army man. Your Program will separate the Belt number, Batch number, Log number and Unit
number and prints the information in the following manner.
Enter Name of Army Man Khan
Enter ID of Army Man: 858993459
Belt number of Khan is : 51
Batch number of Khan is: 614
Log number of Khan is: 25
Unit number of Khan is: 204
String Slicing: Given two strings inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString.Input: The first line of input contains a string inputString. The second line of input contains a string subString. Output: The output should be a sliced string or inputString (if the inputString does not include the subString)
.Follow the below approach to solve the String Slicing. Check Whether the input string includes the substring using if condition and includes().if the input string includes the substring then,Find the index of the substring in the input string, using the indexof() and store the index in a variable.slice the input string, using the slice() form index to the length of the input string and store in the variable slicedString. const slicedString = inputString.slice(index, inputString.length); console the variable sliceString.if the input string doesn't include the substring then else console the input string
Compare connectionless (UDP) and connection-oriented (TCP) communication for distributed computing. Use human interactions to differentiate between the two types of communications. In your response, include real world scenarios where one is advantageous over the other
a. Compare connectionless (UDP) and connection-oriented (TCP) communication for distributed computing. Use human interactions to differentiate between the two types of communications. In your response, include real world scenarios where one is
advantageous over the other.
a. Consider the data marshalling involved in the transmission of the input data items between the web form and the web script: Describe and explain how each of the two aspects is
achieved in this case.
First, ask the user to input how
many members’ information will be entered into the system. Using a linked list, the
program should accept information such as first name, middle name, last name, area code,
telephone number, gender, and age. Upon giving the needed information of each member,
the system will display the information of each member. Use appropriate data types for
each member of the linked list.
give info for member #1
Enter first name: Ta
Enter middle name: Ma
Enter last name: Ta
Enter area code: 047
Enter telephone number: 1-22
Enter gender: male
Enter age: 21
Kindly give the information of member #2
Enter first name: Ja
Enter middle name: La
Enter last name: Ga
Enter area code: 047
Enter telephone number: 2-33
Enter gender: female
Enter age: 18
Welcome to the club Ta Ma Ta!
Your area code and telephone number is (047) 1-22.
You are a male member, and your age is 21.
Welcome to the club Ja La Ga!
Your area code and telephone number are (047) 2-33.
You are a female member, and your age is 18.
b. Suppose you are developing a tic-tac-toe game to be played by two users on separate computers that are interconnected through a network. Throughout a game, the players should see the same game board displayed, and should take turns to update the game board until the game is over. Choose any two of the following distributed computing communication paradigm and describe how you can make use of each in the implementation of your software. Focus your description on (i) how data is shared and communicated between the two users, and (ii) how the player sequencing is controlled (that is, how the players are controlled so that
they take turns to update the game board.)
Create a package named as INFO which contains procedure that is passed a student’s identification number and return student’s full name and phone number from the student table to the calling program and function, pass a department number to it. If the DEPT table does not contain the department number, return a FALSE value otherwise return a TRUE value. Print the appropriate message to the calling program.