General Description You have been chosen to create a version of connect 4. In this version, there can be forbidden positions, or places that neither x nor o can play. However, connecting four together is still the way to win, and this can be done vertically, horizontally, diagonally (or anti-diagonally if you distinguish between the backward diagonal). Required Features 1. You must implement two new game options, one for two players, and one for x player vs computer. a. The player is always x and the computer is always o in that case. b. Player one and two alternate turns. c. Players cannot overwrite each other's moves. d. Players cannot play on forbidden places, and forbidden places do not count for victory. 2. At the start of each game:________. a. Ask the player what game board they want to load. b. Then start with the x player, and alternate. c. Check for victory after each move, not after each pair of moves. d. Players may enter a move, two integers separated by a space, or the words "load game" or "save game" which will either load or save over the current game. 3. You must implement a load game feature. Ask for the file name and load that file. If a game is currently in progress, overwrite that game and immediately start on the loaded game. 4. You must implement a save game feature. Ask for the name that you wish to save to, and save the file to that name. 5. Detect when one or the other player has adjoined the spheres (connected four). a. Display a message with the winning player. b. End that game. c. Go back to the main menu. d. If the board is full, then that is a tie. Design Document There is no design document for this project. It has been replaced with a testing script. Any questions about design documents will be ignored. Required names and Interface Your project should be in proj2.py The design of project 2 is mostly up to you, but we will require that your project create a class: class Adjoin TheSpheres: This must have a method whose definition is: def main menu self):

Answers

Answer 1

To create a custom Connect 4 game in Python, implement two modes (two players and player vs. computer), along with save and load features.

The code for the following is:

from IPython.display import display, HTML, clear_output

import random

import time

# Game Constants

ROWS = 6

COLUMNS = 7

PIECE_NONE = ' '

PIECE_ONE = 'x'

PIECE_TWO = 'o'

PIECE_COLOR_MAP = {

PIECE_NONE : 'white',

PIECE_ONE : 'black',

PIECE_TWO : 'red',}

DIRECTIONS = ((-1, -1), (-1, 0), (-1, 1),( 0, -1), ( 0, 1),( 1, -1), ( 1, 0), ( 1, 1),)

# Board Functions

def create_board(rows=ROWS, columns=COLUMNS):

''' Creates empty Connect 4 board '''

board = []

for row in range(rows):

board_row = []

for column in range(columns):

board_row.append(PIECE_NONE)

board.append(board_row)

return board

# Copy board

def copy_board(board):

''' Return a copy of the board '''

rows = len(board)

columns = len(board[0])

copied = create_board(rows, columns)

for row in range(rows):

for column in range(columns):

copied[row][column] = board[row][column]

return copied

def print_board(board):

''' Prints Connect 4 board '''

for row in board:

print('|' + '|'.join(row) + '|')

def drop_piece(board, column, piece):

''' Attempts to drop specified piece into the board at the

specified column If this succeeds, return True, otherwise return False.'''

for row in reversed(board):

if row[column] == PIECE_NONE:

row[column] = piece

return True

return False

def find_winner(board, length=4):

''' Return whether or not the board has a winner '''

rows = len(board)

columns = len(board[0])

for row in range(rows):

for column in range(columns):

if board[row][column] == PIECE_NONE:

continue

if check_piece(board, row, column, length):

return board[row][column]

return None

def check_piece(board, row, column, length):

''' Return whether or not there is a winning sequence starting from

this piece '''

rows = len(board)

columns = len(board[0])

for dr, dc in DIRECTIONS:

found_winner = True

for i in range(1, length):

r = row + dr*i

c = column + dc*i

if r not in range(rows) or c not in range(columns):

found_winner = False

break

if board[r][c] != board[row][column]:

found_winner = False

break

if found_winner:

return True

return False

# HTML/SVG Functions

def display_html(s):

''' Display string as HTML '''

display(HTML(s))

def create_board_svg(board, radius):

''' Return SVG string containing graphical representation of board '''

rows = len(board)

columns = len(board[0])

diameter = 2*radius

svg = '<svg height="{}" width="{}">'.format(rows*diameter, columns*diameter)

svg += '<rect width="100%" height="100%" fill="blue"/>'

for row in range(rows):

for column in range(columns):

piece = board[row][column]

color = PIECE_COLOR_MAP[piece]

cx = column*diameter + radius

cy = row*diameter + radius

svg += '<circle cx="{}" cy="{}" r="{}" fill="{}"/>'.format(cx, cy, radius*.75, color)

svg += '</svg>'

return svg


Related Questions

1)Write a class called Time that represents time in the form of hour minute and second where (35) hour takes values between 0 and 23, minute is between 0 and 59 and second is between 0 and 59. The constructor public Time(int hour, int minute, int second ) constructs a new time whose hour, month and second are taken from the parameter. The addSec(int sec), addMinute(int minute) and addHour(int hour) add seconds, minutes and hours respectively to the current hour, minute and second. They work exactly as if seconds, minutes and hours were added to the real like 24 hour clock. For a current time of 23:59:59 addSec(1) would result in 00:00:00. Addsec(6) to current time of 05:45:55 would give 05:46:01. AddSec(65) to current time of 05:45:55 would give 05:47:00. AddSec(910) to current time of 05:45:55 would give 06:01:10. The parameters of addHour, addMinute and addSec can be any number >=0. Values less < 0 should be invalidated and no change made. You cannot "go back in time".

Answers

Answer:

See attached image for the source code and output

Your friends’ preschool-age daughter Madison has recently learned to spell some simple words. To help encourage this, her parents got her a colorful set of refrigerator magnets featuring the letters of the alphabet (some number of copies of the letter A, some number of copies of the letter B, and so on), and the last time you saw her the two of you spent a while arranging the magnets to spell out words that she knows. Somehow with you and Madison, things always end up getting more elaborate than originally planned, and soon the two of you were trying to spell out words so as to use up all the magnets in the full set – that is, picking words that she knows how to spell, so that once they were all spelled out, each magnet was participating in the spelling of exactly one of the words. (Multiple copies of words are okay here; so for example, if the set of refrigerator magnets includes two copies of each of ‘C,’ ‘A,’ and ‘T,’ it would be okay to spell out "CAT" twice.) This turned out to be pretty difficult, and it was only later that you realized a plausible reason for this. Suppose we consider a general version of the problem of Using Up All the Refrigerator Magnets, where we replace the English alphabet by an arbitrary collection of symbols, and we model Madison’s vocabulary as an arbitrary set of strings over this collection of symbols.

Answers

Answer:

See explaination

Explanation:

Given a set U which is the set of magnets where each magnet representing a symbol, but are accepted more copies of the same symbol which we number arbitrarily 1,2,3,. ... For example if we had two copies of the symbol A, we would have elements A 1 ,A 2 ) and subsets S 1 ,...S n which represent words formed from the magnets that Madison knows how to spell. Note that if ‘’CAT” was a word in Madison’s vocabulary, then both of the sets C,A 1 ,T and C,A 2 ,T would appear among the S i . We are interested in the maximum number of disjoint sets (which correspond to words in Madison’s vocabulary that can be simultaneously spelled out by the magnet pieces).

We reduce Independent Set (IS) to Set Packing. Given an instance of IS ( G,k ), we set U to be the set of edges of G . For each vertex v i , we introduce a set S i = { e : e = ( v i ,x ) } which has one element for each edge incident to v i . We claim that G has an independent set of size k iff there are k disjoint sets among the S i . Indeed, if I is an independent set of size k then the k sets S v for v ∈ I have no common elements. Also, if { S i 1 ,...,S i k } are k disjoint sets then the vertices v i 1 ,...,v i k have no edges between them thus they form an independent set of size.

Write a Java program which reads a text file and writes the content into a new file. During the read-write process, convert all the upper case letters into lower case ones. In other words, your programming task is to create a new file with the same content of the original file, only that all the upper case letters are converted into lower case ones in the new file.

Answers

Answer:

Kindly go to the explanation part for the code you seek.

Explanation:

This is the Code to Copy:

package file;

import java.io.BufferedReader;

import java.io.BufferedWriter;

import java.io.DataInputStream;

import java.io.FileInputStream;

import java.io.FileWriter;

import java.io.InputStreamReader;

import java.util.Scanner;

public class file

{

public static void main(String []args)

{

try

{

System.out.print("Type a file name: ");

//declare scanner for keyboard input

Scanner reader = new Scanner(System.in);

//scan the input file name

String infilename=reader.nextLine();

//define file stream

FileInputStream fstream = new FileInputStream(infilename);

DataInputStream in = new DataInputStream(fstream);

//define the buffer reader

BufferedReader br = new BufferedReader(new InputStreamReader(in));

String outfilename = "output.txt";

FileWriter fileWriter = new FileWriter(outfilename);

//declare buffer writer for file write

BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);

String strLine,filename;

int status = 0;

int i=0;

//read lines one by one from input file

while ((strLine = br.readLine()) != null)

{

String temp="";

//for each character in a line

for(int k=0;k<strLine.length();k++)

{

char c;

c=strLine.charAt(k);

//if the character is uppercase

if(Character.isUpperCase(c))

//make the character lowercase and append it to the output line

temp +=Character.toLowerCase(c);

else

//character is not lowercase. append to the output line without changing it

temp += c;

}

//write the line to the file

bufferedWriter.write(temp+"\n");

}

//close the input file

in.close();

//close the output file

bufferedWriter.close();

}

catch (Exception e)

{

//System.err.println("Error: " + e.getMessage());

}

}

}

How are graphs used to analyze data?

Answers

Answer:

Graphs and charts are visual representations of data in the form of points, lines, bars, and pie charts. Using graphs or charts, you can display values you measure in an experiment, sales data, or how your electrical use changes over time. Types of graphs and charts include line graphs, bar graphs, and circle charts.

Explanation:

Graphs are used to visually display data, making it easier to identify trends and patterns. They simplify complex data and allow for effective comparisons, aiding better understanding and data-driven decision-making.

Graphs are a powerful tool used to display data visually, making it easier to see trends and patterns compared to numerical data in a table. In high school mathematics, understanding how to interpret various types of graphs is crucial.

Here are some key reasons why graphs are employed:

Visualizing trends: For example, a line graph can show how temperature changes over time, making it easy to spot trends such as increases or decreases.Simplifying complex data: Complicated data sets can often be more easily interpreted when presented in a pie chart, bar graph, or scatter plot rather than a dense table.Comparing data: Graphs allow for side-by-side comparison of different data sets. For example, bar graphs can compare the population of different cities.

Overall, utilizing graphs not only aids in understanding data better but also helps in making data-driven decisions effectively.

What is SDLC? Explain different phases of SDLC in detail.

Answers

Answer:

systems engineering

Explanation:

In systems engineering, information systems and software engineering, the systems development life cycle, also referred to as the application development life-cycle, is a process for planning, creating, testing, and deploying an information system.

what is linux? what is it good for. And why do people use it?

Answers

Answer:

Linux is Unix-based and Unix was originally designed to provide an environment that's powerful, stable and reliable yet easy to use. Linux systems are widely known for their stability and reliability, many Linux servers on the Internet have been running for years without failure or even being restarted

Explanation:

Linux is used for commercial networking

You are in the middle of restarting your computer when the power goes out in the building. When the power is restored, your computer will not restart. When you push the button to turn on the computer, nothing happens. You do not have video on your monitor, but the monitor will turn on. You also notice that you don't hear fans spinning and no indicator lights show on your computer. The monitor is on the same power strip as your computer. What might be the problem?

Answers

Answer:

The Power supply has been damaged.

Explanation:

There is no video on the monitor, but the monitor is tamed on. Also, there is no fan spinning sound. What this means is that the Power supply is not working, because fan is unable to work. The light of monitor is on because the direct power supply from the building is fate.

Note: In case of CMOS RAM is damaged, or processor is damaged, CPU fan will run properly until and unless the power supply is not enough.

Define a JavaScript function named thanos which has a single parameter. This function will be called so that the parameter will be an array. Your function should return a NEW array which contains only the entries at even indices. (Hint: you can tell an index is even if that index mod 2 is equivalent to 0).. Examples: thanos([ ]) would evaluate to [ ] thanos(['0', 2, 4]) would evaluate to ['0', 4]

Answers

Answer:

See explaination

Explanation:

function thanos(lst) {

var result = [];

for (var i = 0; i < lst.length; i += 2) {

result.push(lst[i]);

}

return result;

}

// Testing the function here. ignore/remove the code below if not required

console.log(thanos([]));

console.log(thanos(['0', 2, 4]));

Consider the following method substringFound, which is intended to return true if a substring, key, is located at a specific index of the string phrase. Otherwise, it should return false.
public boolean substringFound(String phrase, String key, int index)
{
String part = phrase.substring(index, index + key.length());
return part.equals(key);
}
Which of the following is the best precondition for index so that the method will return the appropriate result in all cases and a runtime error can be avoided?
A. 0 <= index < phrase.length()
B. 0 <= index < key.length()
C. 0 <= index < phrase.length() + key.length()
D. 0 <= index < phrase.length() - key.length()
E. 0 <= index < phrase.length() - index

Answers

Answer:

Option D 0 <= index < phrase.length() - key.length()

Explanation:

The index has to be between the range of 0 <= index < phrase length - key length to prevent index out of bound error. This is because the substring method will have to extract part of the string with a certain length from the original string starting from the index-position. If the key length is longer than the string area between phrase[index] and  phase.length(), an index out of bound runtime error will be thrown.

Write an application that inputs a telephone number as a string in the form (555) 555-5555. The application should use String method split to extract the area code as a token, the first three digits of the phone number as a token and the last four digits of the phone number as a token. The seven digits of the phone number should be concatenated into one string. Both the area code and the phone number should be printed. Remember that you will have to change deliminator characters during the tokenization process.

Answers

Answer:

See explaination

Explanation:

// File: TelephoneNumber.java

import java.util.Scanner;

public class TelephoneNumber

{

public static void main(String[] args)

{

Scanner input = new Scanner(System.in);

String inputNumber;

String tokens1[];

String tokens2[];

String areaCode;

String firstThree;

String lastFour;

String allSeven;

String fullNumber;

/* input a telephone number as a string in the form (555) 555-5555BsAt4ube4GblQIAAAAASUVORK5CYII= */

System.out.print("Enter a telephone number as '(XXX) XXX-XXXX': ");

inputNumber = input.nextLine();

System.out.println();

/* use String method split */

tokens1 = inputNumber.split(" ");

/* extract the area code as a token */

areaCode = tokens1[0].substring(1, 4);

/* use String method split */

tokens2 = tokens1[1].split("-");

/* extract the first three digits of the phone number as a token */

firstThree = tokens2[0];

/* extract the last four digits of the phone number as a token */

lastFour = tokens2[1];

/* concatenate the seven digits of the phone number into one string */

allSeven = firstThree + lastFour;

/* concatenate both the area code and the seven digits of the phone number into one full string separated by one space */

fullNumber = areaCode + " " + allSeven;

/* print both the area code and the phone number */

System.out.println("Area code: " + areaCode);

System.out.println("Phone number: " + allSeven);

System.out.println("Full Phone number: " + fullNumber);

}

}

Which of the following can be considered beta testing? A programmer at Linus Systems checks the integration of multiple modules of an information system. System users at URP feed data into a new information system to test its capability. MNP Inc. checks the system to ensure that it meets all the necessary design requirements. Taro Inc. checks the correctness of the modules in its new information system. Software testers compare the finished system against user requirements to see if it satisfies all necessary criteria.

Answers

Final answer:

System users at URP feeding data into a new information system to test its capability represents beta testing, where real users assess the software in real-world conditions.

Explanation:

The scenario that can be considered beta testing is when system users at URP feed data into a new information system to test its capability. Beta testing involves real users testing the software in a production environment to identify any unresolved bugs or issues before the official release. It is typically the last type of testing done after in-house tests such as unit testing and integration testing have been completed.

In beta testing, the goal is to assess how well the software performs under real-world conditions and to gather feedback from users that can be used to further improve the product's design. This is consistent with the cycle of prototyping, testing, and refinement discussed in the provided references, where testing and evaluation reveal weaknesses or potential improvements, and the design may be adjusted accordingly.

Other scenarios described may represent different levels and types of testing such as integration testing, system testing, or validation testing, which occur before beta testing in the software development lifecycle.

Select the correct statements regarding Asynchronous Transfer Mode (ATM): a. ATM is a fixed-length cell standard that supports voice, video and data b. ATM is connection-oriented c. ATM offers predictability regarding latency; therefore ATM can offer quality-of-service (QoS) to users d. All of the above are correct

Answers

Answer:

D. All of the above are correct.

Explanation:

Asynchronous Transfer Mode is a fixed-length cell structure which allows cells to support voice, video  and data. Voice data can be converted to packets and shared with large packet data. Because voice packets, encounter queuing delays, they ought to be of the same size or length.

ATM provides a route between two end points and that is why it can be said to be connection oriented. There is an ease of switching in hardware because of the fixed structure of the ATM. It also offers predictability regarding latency which could be either high or low. So, all of the above satisfy the mode of operation of the Asynchronous Transfer Mode.

Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and presenting request trends to management each month. Tom uses Microsoft PowerPoint 2016 to create his presentations. As he hovers over each choice, Tom sees his slide change automatically. What Tom is experiencing is called ____.

Answers

Answer:

Live Preview.

Explanation:

This is a feature specifically found in the microsoft power point in detailing or slides showing in a preliminary stage of its previews.

By default, when you select the composing email content and change its text format, such as text font, size, color and so on, the live preview will be displayed when you put your cursor on different text format.

Actually the live preview function can be enabled or disabled manually in Outlook. In this tutorial, we will show you how to enable or disable live preview in Outlook in details.

Create a winform application that lets the user enter a temperature. With a ComboBox object offer the user three choices for input type: Farenheit, Celsius, and Kelvin. Offer the same three choices for the output type. Now when the user clicks the Calculate button, convert them temp and show the user the results.

Answers

Answer:

See explaination

Explanation:

//namespace

using System;

using System.Windows.Forms;

//application namespace

namespace TemperatureConversionApp

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

//calculate button click

private void btnCalculate_Click(object sender, EventArgs e)

{

//taking temperature type

string temperatureType = cmbTemperatureType.SelectedItem.ToString();

//taking temperature entered by user

double temperature = double.Parse(txtTemperature.Text);

//taking conversion temperature type

string conversionType = cmbConversionType.SelectedItem.ToString();

//checking temperature type and conversion type

if(temperatureType == "Farenheit" && conversionType == "Celsius")

{

//if Farenheit to Celsius temperature then

double temp = (temperature - 32) * 5 / 9;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Farenheit is " + temp.ToString("0.00") + " Celsius";

}

else if (temperatureType == "Farenheit" && conversionType == "Kelvin")

{

//if Farenheit to Kelvin temperature then

double temp = (temperature - 32) * 5 / 9+273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Farenheit is " + temp.ToString("0.00") + " Kelvin";

}

else if (temperatureType == "Celsius" && conversionType == "Kelvin")

{

//if Celsius to Kelvin temperature then

double temp = temperature + 273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Celsius is " + temp.ToString("0.00") + " Kelvin";

}

else if (temperatureType == "Celsius" && conversionType == "Farenheit")

{

//if Celsius to Farenheit temperature then

double temp = (temperature*9/5) +32;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Celsius is " + temp.ToString("0.00") + " Farenheit";

}

else if (temperatureType == "Kelvin" && conversionType == "Farenheit")

{

//if Kelvin to Farenheit temperature then

double temp = (temperature-273.15) * 9 / 5 + 32;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Kelvin is " + temp.ToString("0.00") + " Farenheit";

}

else if (temperatureType == "Kelvin" && conversionType == "Celsius")

{

//if Kelvin to Celsius temperature then

double temp = temperature - 273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Kelvin is " + temp.ToString("0.00") + " Celsius";

}

else

{

lblDetails.Text = "Select valid temperature conversion unit";

}

}

//Exit button click

private void btnExit_Click(object sender, EventArgs e)

{

this.Close();//close application

}

}

}

check attachment for the windows application

Write a program to determine all pairs of positive integers, (a, b), such that a < b < n and (a 2 b 2 1)/(ab) is an integer. Here n is an integer and n > 1. Note: Your method should take n as a parameter and return nothing. You should print inside the method.c

Answers

Answer:

following are the code to this question:

#include <iostream> //defining header file  

using namespace std;  

void me(int n) //defining a method me, that accept an integer value  

{  

int a,b,t1,t2; //defining integer variable  

for(a = 1; a<n; a++) //defining loop to calculates a variable value  

{

for(b=a+1; b<n; b++) //defining loop to calculates a variable value  

{

t1=(a*a)+(b*b)+1; //hold value in t1 value

t2=a*b; // calculates multiplication value and hold in t2 variable          

if(t1%t2==0) //defining condition that check calculated value is equal to 0

{

cout<<"("<<a<<","<<b<<")"; //print a and b value.

}

}

}

}

int main() //defining main method

{

int n; // defining integer variable

cout<< "Enter a number: "; //print message

cin>> n; // input value  

if(n>1) //defining condition that check value is greater then 1

{

me(n); //call method and pass the value

}

else

{

cout<<"Enter a number, which is greater then 1";  //print message  

}

   return 0;

}

Output:

Enter a number: 3

(1,2)

Explanation:

In the given C++ language code, a method "me" is defined, that accepts an integer value "n" as its parameter and this method does not return any value because its return type is void, inside the method two for loop is declared, that calculates a and b value and hold in t1 and t2 variable.

In the next step, if the condition is used, that checks module of t1 and t2 is equal to 0, then it will print a, b value. Inside the main method an integer variable n is declared, that accepts a value from the user end, and use if block that checks user input is greater then 1, then we call method otherwise, print a message.  

Write a program that uses nested loop or for statements to display Pattern A below, followed by an empty line and then another set of loops that displays Pattern B. Once again no setw implementation is allowed here but you must use nested loop or for statements with proper indentation to generate these patterns. Use meaningful variable identifier names, good prompting messages and appropriate comments for each loop segment as well as other sections in the body of your program.

Note: Each triangle has exactly seven rows and the width of each row is an odd number. The triangles have appropriate labels displayed.


Pattern A

+

+++

+++++

+++++++

+++++++++

+++++++++++

+++++++++++++

Pattern B

+++++++++++++

+++++++++++

+++++++++

+++++++

+++++

+++

+

Answers

Answer:

public class Pyramid {

   public static void main(String[] args) {

             int h = 7;

       System.out.println("Pattern A");

               for(int i = 1; i <= h; ++i)

               {

                   for(int j = 1; j <= i; ++j) {

                       System.out.print("+");

                   }

                   System.out.println();

               }

       System.out.println();

       System.out.println("Pattern B");

               for (int i = 1; i<=h; ++i)

               {

                 for(int j = h; j >=i; --j){

                     System.out.print("+");

                 }

                   System.out.println();

               }

           }

       }

Explanation:

The trick in this code is using a nested for loopThe outer for loop runs from i = 0 to the heigth of the triangle (in this case 7)The inner for loop which prints the (+) sign runs from j = 0 to j<=iIt prints the + using the print() function and not println()In the pattern B the loop is reversed to start from  i = height

Q2 - Square Everything (0.25 points) Write a function called square_all that takes an input called collection that you assume to be a list or tuple of numbers. This function should return a new list, which contains the square of each value in collection. To do so, inside the function, you will define a new list, use a loop to loop through the input list, use an operator to square the current value, and use the append method to add this to your output list. After the loop, return the output list.g

Answers

Answer:

See explaination

Explanation:

#Define the function square_all() having a list of

#integers. This function will return a list of square

#of all integer included in the given list.

def square_all(num_list):

#Create an empty list to store resultant list.

sq_list = []

#Start a for loop till the length of the given list.

for index in range(0, len(num_list)):

#Multiply the current list value with its value

#and append the resultant value in the list

#sq_list in each iteration.

sq_list.append(num_list[index] * num_list[index])

#Return the final list of squares of all integrs in

#the list num_list.

return sq_list

#Declare and initialize a list of integers.

intList = [2, 4]

#Call the function square_all() and pass the above list

#as argument of the function. Display the returned list.

print(square_all(intList))

For credit card processing, stock exchanges, and airline reservations, data availability must be continuous. There are many other examples of mission-critical applications. Research the Internet to find four additional mission-critical applications and explain why data availability must be continuous for these applications. If you use information from the Web, use reputable sites. Do not plagiarize or copy from the Web. Be sure to cite your references.

Answers

Answer:

The answer to this question can be described as follows:

Explanation:

The mission-critical System-

A vital mission program is necessary for an organization's life. If a critical task program disrupted, industrial control should be severely affected.  The essential support device is often referred to as critical task equipment.

Safety system for nuclear reactors-

The nuclear power plant is used to control the system, and it also contains and continues reactions.  It's also usually used only for energy production, and also used experiments and clinical isotope manufacture.  

If another system of nuclear power fails, this could result in a continuous nuclear reaction in a range of aspects like irradiated leaks. These same persons across the area may experience serious radioactivity symptoms.

The main task in their personal life-  

They realize, that without power, they turn down your entire life when you've never encountered a dark off with more than 30 minutes. Essentially, people wouldn't have been allowed to do what you'll do, entirely frozen.  

Consumer survey: big financial transfer controlling business-

That company is the infrastructure and software supplier for banks, traders, distributors, and institutional investors to take out money transfers. With all the money transfers they depend on, you must establish a successful company to become the 'guy behind the button', etc.

Jim is a forensic specialist. He seized a suspect computer from a crime scene, removed the hard drive and bagged it, documented and labeled the equipment, took photographs, completed a chain of custody form, and locked the computer in his car. On the way to the lab, he stopped to purchase supplies to use at the next crime scene. What did Jim do wrong

Answers

Answer: Jim left the computer unattended while shopping for supplies to be used at the next crime scene.

Explanation: While transporting the evidence to a secure location (lab), he left the computer unattended in his car and goes shopping for supplies that will be used in his next crime scenes. This act will give the criminals or their accomplice the opportunity to break into his car and tamper with what ever evidence he might have left behind in his car.

Write a telephone lookup program. Read a data set of 1,000 names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups.

Answers

Answer:

See explaination

Explanation:

PhoneLookup.java

import java.io.FileReader;

import java.io.IOException;

import java.util.Scanner;

public class PhoneLookup

{

public static void main(String[] args) throws IOException

{

Scanner in = new Scanner(System.in);

System.out.println("Enter the name of the phonebook file: ");

String fileName = in.nextLine();

LookupTable table = new LookupTable();

FileReader reader = new FileReader(fileName);

table.read(new Scanner(reader));

boolean more = true;

while (more)

{

System.out.println("Lookup N)ame, P)hone number, Q)uit?");

String cmd = in.nextLine();

if (cmd.equalsIgnoreCase("Q"))

more = false;

else if (cmd.equalsIgnoreCase("N"))

{

System.out.println("Enter name:");

String n = in.nextLine();

System.out.println("Phone number: " + table.lookup(n));

}

else if (cmd.equalsIgnoreCase("P"))

{

System.out.println("Enter phone number:");

String n = in.nextLine();

System.out.println("Name: " + table.reverseLookup(n));

}

}

}

}

LookupTable.java

import java.util.ArrayList;

import java.util.Collections;

import java.util.Scanner;

/**

A table for lookups and reverse lookups

*/

public class LookupTable

{

private ArrayList<Item> people;

/**

Constructs a LookupTable object.

*/

public LookupTable()

{

people = new ArrayList<Item>();

}

/**

Reads key/value pairs.

atparam in the scanner for reading the input

*/

public void read(Scanner in)

{

while(in.hasNext()){

String name = in.nextLine();

String number = in.nextLine();

people.add(new Item(name, number));

}

}

/**

Looks up an item in the table.

atparam k the key to find

atreturn the value with the given key, or null if no

such item was found.

*/

public String lookup(String k)

{

String output = null;

for(Item item: people){

if(k.equals(item.getName())){

output = item.getNumber();

}

}

return output;

}

/**

Looks up an item in the table.

atparam v the value to find

atreturn the key with the given value, or null if no

such item was found.

*/

public String reverseLookup(String v)

{

String output = null;

for(Item item: people){

if(v.equals(item.getNumber())){

output = item.getName();

}

}

return output;

}

}

Item.java

public class Item {

private String name, number;

public Item(String aName, String aNumber){

name = aName;

number = aNumber;

}

public String getName(){

return name;

}

public String getNumber(){

return number;

}

}

input.txt

Abbott, Amy

408-924-1669

Abeyta, Ric

408-924-2185

Abrams, Arthur

408-924-6120

Abriam-Yago, Kathy

408-924-3159

Accardo, Dan

408-924-2236

Acevedo, Elvira

408-924-5200

Acevedo, Gloria

408-924-6556

Achtenhagen, Stephen

408-924-3522

Note: Replace all the "at" with at symbol

) Write the code to display the content below using user input. The program Name is Half_XmasTree. This program MUST use (ONLY) for loops to display the output below from 10 to 1 therefore ...1st row prints 10 star 2nd row prints 9… 3rd print 8 stars and so forth... This program is controlled by the user to input the amount of row. A good test condition is the value of ten rows. The user will demand the size of the tree. Remember the purpose of print() and println()

Answers

Answer:

Following are the program in java language that is mention below

Explanation:

import java.util.*;  // import package

public class Half_XmasTree // main class

{

public static void main(String args[])  // main method

{

int k,i1,j1; // variable declaration  

Scanner sc2=new Scanner(System.in);   // create the object of scanner

System.out.println("Enter the Number of rows : ");

k=sc2.nextInt(); // Read input by user

for(i1=0;i1<k;i1++)  //iterating the loop

{

for(j1=0;j1<i1;j1++)  // iterating the loop

System.out.print(" ");

for(int r=k-i1;r>0;r--)  //iterating loop

System.out.print("*");  // print *

System.out.println();

}

}

}

Output:

Following are the attachment of output

Following are the description of program

Declared a variable k,i1,j1 as integer type .Create a instance of scanner class "sc2" for taking the input of the rows.Read the input of row in the variable "K" by using nextInt() method .We used three for loop for implement this program .In the last loop we print the * by using system.println() method.

The Half_XmasTree program illustrates the use of loops

Loops are used for operations that must be repeated until a certain condition is met.

The Half_XmasTree program

The Half_XmasTree program written in Java where comments are used to explain each action is as follows:

import java.util.*;

public class Half_XmasTree{

public static void main(String args[]){

   //This creates a Scanner object

   Scanner input =new Scanner(System.in);

   //This prompts the user for the number of rows

   System.out.print("Number of rows: ");

   //This gets input the user for the number of rows

   int rows=input.nextInt();

   //The following iteration prints the half x-mas tree

   for(int i=0; i<rows;i++){

       for(int j=0;j<i;j++){

           System.out.print(" ");

       }

       for(int r=rows-i;r>0;r--){

           System.out.print("*");

       }

       System.out.println();

   }

}

}

Read more about loops at:

https://brainly.com/question/24833629

_____ has many knowledge management applications, ranging from mapping knowledge flows and identifying knowledge gaps within organizations to helping establish collaborative networks. Select one: a. Social network analysis (SNA) b. Branching router-based multicast routing (BRM) c. Online analytical processing (OLAP) d. Drill-down analysis (DDA)

Answers

Answer:

A. Social network analysis (SNA).

Explanation:

This is explained to be a process of quantitative and qualitative analysis of a social network. It measures and maps the flow of relationships and relationship changes between knowledge possessing entities. Simple and complex entities include websites, computers, animals, humans, groups, organizations and nations.

The SNA structure is made up of node entities, such as humans, and ties, such as relationships. The advent of modern thought and computing facilitated a gradual evolution of the social networking concept in the form of highly complex, graphical based networks with many types of nodes and ties. These networks are the key to procedures and initiatives involving problem solving, administration and operations.

What are techniques for active listening? Select all
that apply.

1. asking clarifying questions, without
interrupting
2. keeping eye contact
3. indicating full agreement to what is being said

Answers

1.) asking clarifying questions, without interrupting

2.) keeping eye contact

Techniques for active listening are

asking clarifying questions, without interruptingkeeping eye contact

The correct options are 1 and 2.

What is active listening?

An active listening is when a person actively listens to another person.

A person must maintain eye contact with the speaker while in conversation with him.

Also, they must have two way conversation between them.

Thus, correct options are 1 and 2.

Learn more about active listening.

https://brainly.com/question/3013119

#SPJ2

Create a public non-final class called InsertionSorter. It should provide one public class method called sort. Sort should accept an array of Comparable Java objects and sort them in ascending order. However, it should sort the array in place, meaning that you modify the original array, and return the number of swaps required to sort the array. That’s how we’ll know you’ve correctly implemented insertion sort. If the array is null or empty you should return 0. You can assume that the array does not contain any null values.

Answers

Answer:

See explaination

Explanation:

public class InsertionSorter {

/* Function to sort array using insertion sort */

int sort(Comparable arr[]) {

int count = 0;

if (arr == null || arr.length == 0)

return 0;

int n = arr.length;

for (int i = 1; i < n; ++i) {

Comparable key = arr[i];

int j = i - 1;

while (j >= 0 && arr[j].compareTo(key) > 0) {

count++;

arr[j + 1] = arr[j];

j = j - 1;

}

arr[j + 1] = key;

}

return count;

}

// Driver method

public static void main(String args[]) {

Integer arr[] = { 50,21,34,26, 18, 31, 37, 54 };

InsertionSorter ob = new InsertionSorter();

int comp = ob.sort(arr);

System.out.println("Comparisons required : "+comp);

for(int i:arr)

System.out.print(i+" ");

}

}

When Judy logged on the network, she faced the message requesting that she changes her password. So, she changed her password. But, she does not like to remember too many passwords. She wants to keep only one password. So, she tried to change the password again to her original password. But, she cannot change the password. Why can’t she change the password

Answers

Answer:

Because reusing the old passwords possess security threats.

Explanation:

A password can be defined as a string of characters or words or phrases that are used to authenticate the identity of the user. It is also known as passcode and should be kept confidential. A password is used to access constricted systems, applications, etc.

A password or passcode is usually composed of alphabets, numbers, symbols, characters, alphanumeric, or a combination of these.

In the given case, Judy was not able to change her passcode to the previous one because reusing old passwords is prohibited in any sites or systems. A system denies the user to reuse the old passwords for various reasons but most importantly due to security reasons. Though it is said that old passwords can be used after 100 times but seldom someone changes a password that much. All systems care for the security of their users thus they deny reusing old passcodes.

g What field in the IPv4 datagram header can be used to ensure that a packet is forwarded through no more than N routers? When a large datagram is fragmented into multiple smaller datagrams, where are these smaller datagrams reassembled into a single larger datagram? Do routers have IP addresses? If so, how many? How many bits do we have in an IPv6 address? We use hexadecimal digits (each with 4 bits) to represent an IPv6 address. How many hexadecimal digits do we need to represent an IPv6 address?

Answers

Answer:

a) Time to live field

b) Destination

c) Yes, they have two ip addresses.

d) 128 bits

e) 32 hexadecimal digits

Explanation:

a) the time to live field (TTL) indicates how long a packet can survive in a network and whether the packet should be discarded. The TTL is filled to limit the number of packets passing through N routers.

b) When a large datagram is fragmented into multiple smaller datagrams, they are reassembled at the destination into a single large datagram before beung passed to the next layer.

c) Yes, each router has a unique IP address that can be used to identify it. Each router has two IP addresses, each assigned to the wide area network interface and the local area network interface.

d) IPv6 addresses are represented by eight our characters hexadecimal numbers. Each hexadecimal number have 16 bits making a total of 128 bits (8 × 16)  

e) IPv6 address has 32 hexadecimal digits with 4 bits/hex digit

The TCP/IP concepts of packet forwarding, fragmentation, and reassembly along with IPv4 and IPv6 addressing schemes are explained.

TTL (Time To Live) field in the IPv4 datagram header can be used to ensure that a packet is forwarded through no more than N routers. When a large datagram is fragmented into multiple smaller datagrams, these smaller datagrams are reassembled into a single larger datagram at the destination host. Routers do have IP addresses, typically one per interface, so the number varies. IPv6 addresses consist of 128 bits; represented using hexadecimal digits (each 4 bits), hence we need 32 hexadecimal digits to represent an IPv6 address.

What are advantages of lookup fields?

Answers

Answer:

Easier data entry, acceptable values, fewer misspellings

Explanation:

Edge 2021

A column in a table that looks up data from another table or query is known as a lookup field.

What is Lookup filed?

The Lookup Wizard should always be used to create a lookup field. The Lookup Wizard streamlines the procedure by automating the required field attributes' automatic insertion and the creation of the proper table associations.

A lookup field is used to display something more meaningful, such a name, instead of a number like an ID. For instance, Access can show a contact name rather than a contact ID number.

The bound value is the contact ID number. It is automatically replaced with the contact name after being looked up in a source database or query.

Therefore, A column in a table that looks up data from another table or query is known as a lookup field.

To learn more about lookup field, refer to the link:

https://brainly.com/question/31923038

#SPJ2

QUESTION
UNi-Library is conducting a survey to rate the quality of their services in order to improve their
services. In the survey, 30 students were asked to rate the quality of the service in the library on a
scale of 1 to 5 (1 indicating very bad and 5 indicating excellent). You have to store the 30 responses of
the students in an array named responses [ ]. Then, you have to count the frequency of each scale
and store it in an array named frequency[ ]. Use the appropriate looping structure to enter the
responses and to count the frequency. You are also required to display the percentage of the
frequency of each scale. Display the scale, frequency and its percentage as shown below.
The program also allows the user to repeat this process as often as the user wishes.

*Write a complete C++ program*​

Answers

Answer:

Explanation:

#include <iostream>

using namespace std;

int main ()

{

   int responses[30],count[6];

   int score = 0;

   string resp = " ";

   for (int i = 0; i < 30; i++)

   {

    responses[i] = 0;

   }

   for (int i = 0; i < 6; i++)

   {

    count[i,1]=0;

    count[i,2]=0;

    count[i,0]=0;

   }

   while ((resp != "Y") && (resp != "y"))

   {

    for (int i = 0; i < 30; i++)

    {

        while ((score > 5) || (score < 1))

           {

            cout << "Student " << (i+1)<< " please enter a value (1-5):";

            cin >> score;

        }

           responses[i] = score;

           if((score > 5)||(score<1))

           {

               if(score==1) count[1]++;        

               if(score==2) count[2]++;        

               if(score==3) count[3]++;        

               if(score==4) count[4]++;        

               if(score==5) count[5]++;        

           }

           score = 0;

    }

    cout<< "Response               Frequency              Percentage"<<endl;;

    cout<< "    1                      "<<count[1]<<"               "<<(count[1]/30)<<"%"<<endl;

    cout<< "    2                      "<<count[2]<<"               "<<(count[2]/30)<<"%"<<endl;

    cout<< "    3                      "<<count[3]<<"               "<<(count[3]/30)<<"%"<<endl;

    cout<< "    4                      "<<count[4]<<"               "<<(count[4]/30)<<"%"<<endl;

    cout<< "    5                      "<<count[5]<<"               "<<(count[5]/30)<<"%"<<endl;

    cout<< "Do you want to exit? Press Y to exit any other key to continue: ";

    cin>> resp;

   }

   return 0;

}

// Marian Basting takes in small sewing jobs. // She has two files sorted by date. // (The date is composed of two numbers -- month and year.) // One file holds new sewing projects // (such as "wedding dress") // and the other contains repair jobs // (such as "replace jacket zipper"). // Each file contains the month, day, client name, phone number, // job description, and price. // Currently, this program merges the files to produce // a report that lists all of Marian's jobs for the year // in date order. // Modify the program to also display her total earnings // at the end of each month as well as at the end of the year.

Answers

Answer:

See Explaination

Explanation:

Provided Pseudocode as per your new specifications:

start

Declarations

num weddingMonth

num weddingDay

string weddingClientName

num weddingPhoneNum

string weddingDescription

num weddingPrice

num replaceMonth

num replaceDay

string replaceClientName

num replacePhoneNum

string replaceDescription

num replacePrice

num weddingDate

num replaceDate

num bothAtEnd=0

num END_YEAR=9999

InputFile weddingFile

InputFile replaceFile

ouputFile mergedFile

getReady()

while bothAtEnd<>1

mergeRecords()

endwhile

finishUp()

stop

getReady()

open weddingFile "weddingDress.dat"

open replaceFile "replaceJacketZipper.dat"

open mergedFile “Merged.dat”

readWedding()

readreplace()

checkEnd()

return

readWedding( )

input weddingMonth,weddingDay,weddingClientName,weddingPhoneNum,weddingDescription,weddingPricee from weddingFile

while eof

weddingDate=END_YEAR

endwhile

return

readreplace( )

input replaceMonth,replaceDay,replaceClientName,replacePhoneNum,replaceDescription,replacePricee from replaceFile

while eof

replaceDate=END_YEAR

endwhile

return

checkEnd()

if weddingDate=END_YEAR

if replaceDate=END_YEAR

bothAtEnd=1

endif

endif

return

mergedFile()

if weddingDate<replaceDate

output weddingMonth,weddingDay,weddingClientName,weddingPhoneNum,weddingDescription,weddingPricee to weddingFile

readWedding()

endif

Final answer:

The question is about adding functionality to a computer program to display monthly and yearly earnings for Marian Basting's sewing jobs. This involves data handling, control structures, and algorithms to manage and total earnings in the generated report.

Explanation:

The question pertains to modifying a computer program for Marian Basting, who takes in sewing jobs and tracks them in two sorted files. The program should not only merge the files to produce a date-ordered report of all Marian's jobs for the year but should also be modified to display total earnings at the end of each month and the yearly total earnings. To achieve this, the program would require additional functionality to sum the price of jobs, categorized by month and then aggregated for the year-end total. This could involve processing each entry, keeping a running total, and then displaying the totals when a new month starts or the report ends.

For clarity, here's a hypothetical implementation outline: Load the entries from both files, sort them by date, iterate through the sorted list while maintaining a subtotal for each month's earnings. After processing all entries for a month, display the subtotal. Upon reaching year-end, display the final total. This implementation requires knowledge of programming concepts such as data handling, control structures, and algorithms for sorting and totaling.

g Given an array, the task is to design an efficient algorithm to tell whether the array has a majority element, and, if so, to find that element. The elements of the array are not necessarily from some ordered domain like the integers, and so there can be no comparisons of the form "is A[i] ≥ A[j]?". (Think of the array elements as GIF files, say.) However you can answer questions of the form: "is A[i] = A[j]?" in constant time

Answers

Answer:

If there is a majority element in the array it will be the median. Thus,

just run the linear time median finding algorithm, and compare the result with all the  elements of the array (also linear time). If [tex]\frac{n}{2}[/tex]elements are the same as the median, the  median is a ma majority element. If not, there is none.

Suppose now that the elements of the array are not from some ordered domain like the  integers, and so there can be no comparisons of the form "is the ith element of the array  greater than the jth element of the array?" However you can answer questions of the  form:

"Are the ith and jth elements of the array the same?" in constant time. Such

queries constitute the only way whereby you can access the array. (Think of the elements  of the array as GIF files, say.) Notice that your solution above cannot be used now.

Other Questions
PLEASE HELP! NEED ANSWER QUICK! When I get more points, I will make another post with a 100 point reward for those who answer this, plus brainliest.Write a descriptive essay in which you use descriptive techniques to describe a place you know well. This essay must be 400-500 words about a place. It should include extremely vivid sensory language, figurative language, comparative and/or superlative adverbs or adjectives, strong word choice, and appropriate voice, tone, and style.NEEDS TO BE COMPLETELY ORIGINAL! To apply Problem-Solving Strategy 21.1 Faraday's law. A closely wound rectangular coil of 80 turns has dimensions 25.0 cm by 40.0 cm. The plane of the coil is rotated from a position in which it makes an angle of 37.0 degrees with a magnetic field of 1.10 T to a position perpendicular to the field. The rotation takes 0.0600 s. What is the average emf E induced in the coil Fill in the blank to make the two fractions equivalent?/27= 8/9 Which is the equation for the graph of the limacon curve below? [- 5, 5] by [- 5, 5) r=3-2sin theta r=2-3 sin theta r=2-2 sin theta r=4- sin theta Jasmine has 3 and 3/8 pound of Turkey meat she is making 1/3 pound Turkey burgers does Jasmine have enough meat to make 12 Turkey burgers ABCDhelpppppp!!!! Please answer ASAP I will give you five stars Which of the following drugs would NOT block the cell cycle, and thus would NOT be appropriate cancer treatment? Nocodazole, a drug that blocks spindle fiber (microtubule) formation 5-flurouracil, a DNA analog that blocks DNA replication Sphingosine-1-phosphate, a molecule that stimulates relay molecules in signaling Brinapant, a drug that increases apoptosis (cell death) Bevacizumab, a drug that blocks formation of new blood vessels so that less oxygen is available for cancer cells What form is this equation in y= -3(x-5)^2+7 in? Helppp plzz!! Will mark you as brainliest!! A semicircle with points A and B is shown below.When the semicircle is rotated about the side AB, which of the following threedimensional figures is created?A. coneB. cylinderC. cubeD. sphere What is 8/16 I will give brainlyist Linwood is making an equipment change at his company. An old piece of equipment, with a salvage value of $60,000, is being replaced by new equipment. The new equipment costs $980,000 and would have a 10 year useful life and no salvage value. By replacing the equipment, Linwood will save $164,000 per year in cash operating costs. The simple rate of return on this investment is How many possible outcomes exist when Louisa spins the spinner below twice? A spinner with 8 equal sections labeled 1 through 8. 8 10 16 64 Which quotation best describes the relationship between Puebla and modern day Cinco de Mayo celebration List and explain 2 results of the increase in trade in Europe. (i will mark branliest) The members of a wheelchair basketball league are playing a benefit game to meet their fundraising goal of $900. Tickets cost $15 and snacks cost $6. What does it mean by round to the nearest degree. In its first year of operations, Woodmount Corporation reported pretax accounting income of $640 million for the current year. Depreciation reported in the tax return in excess of depreciation in the income statement was $480 million. The excess tax will reverse itself evenly over the next three years. The current year's tax rate of 25% will be reduced under the current law to 30% next year and 35% for all subsequent years. At the end of the current year, the deferred tax liability related to the excess depreciation will be: Refer to the payoff matrix at right for the profits (in $ millions) of two firms (A and B) and two pricing strategies (high and low). Which of the following is the outcome of the dominant strategy without cooperation? A. Both firm A and firm B choose the low price. B. Firm A chooses the high price while firm B chooses the low price. C. Firm A chooses the low price while firm B chooses the high price. D. Both firm A and firm B choose the high price. The force exerted by a seedling as it pushes its way through the soil is due to the _____ created inside its cells. A. water solubility B. water movement C. water leakage D. water pressure Steam Workshop Downloader