Questions
a)  In a subnet, a host has been assigned the following configuration parameters: 10.42.4.232/13. What is the...

a)  In a subnet, a host has been assigned the following configuration parameters: 10.42.4.232/13. What is the last valid IP address on the network that this host is a part of?

b)  In a subnet, a host has been assigned the following configuration parameters: 172.20.122.6/255.255.248.0. What is the broadcast address on the network that this host is a part of?

c)  In a subnet, a host has been assigned the following configuration parameters: 10.158.253.161/255.192.0.0. What is the broadcast address on the network that this host is a part of?

d)  In a subnet, a host has been assigned the following configuration parameters: 192.168.27.76/28. What is the first valid IP address on the network that this host is a part of?

e)  In a subnet, a host has been assigned the following configuration parameters: 10.26.22.90/12. What is the first valid IP address on the network that this host is a part of?

All answers must be in dotted decimal notation.

In: Computer Science

City 1 1 1 City 2 1 3 City 3 4 1 City 4 5 3...

City 1

1

1

City 2

1

3

City 3

4

1

City 4

5

3

City 5

3

5

in java Create 5 city objects and initialize their location (x and y) using the above table. Then put all of the five cities in a vector.

In: Computer Science

**** I need the answer with unique words .. thank you In your own word, explain...

**** I need the answer with unique words .. thank you

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.

Answer :

to increase performance. In computing, denormalization is the process of trying to improve the read performance of a database, at the expense of losing some write performance, by adding redundant copies of data or by grouping data.[1][2] It is often motivated by performance or scalability in relational database software needing to carry out very large numbers of read operations. Denormalization differs from the unnormalized form in that denormalization benefits can only be fully realized on a data model that is otherwise normalized.

Denormalization is a database optimization technique in which we add redundant data to one or more tables. This can help us avoid costly joins in a relational database. Note that denormalization does not mean not doing normalization. It is an optimization technique that is applied after doing normalization.

In a traditional normalized database, we store data in separate logical tables and attempt to minimize redundant data. We may strive to have only one copy of each piece of data in database.
For example, in a normalized database, we might have a Courses table and a Teachers table.Each entry in Courses would store the teacherID for a Course but not the teacherName. When we need to retrieve a list of all Courses with the Teacher name, we would do a join between these two tables.
In some ways, this is great; if a teacher changes is or her name, we only have to update the name in one place.
The drawback is that if tables are large, we may spend an unnecessarily long time doing joins on tables.

I have explained each and every part of the first and third question only according to "Chegg guidelines when multiple questions are given then only first question needs to be answered" with the help of statements attached to the answer above.

In: Computer Science

In Python Create customer information system as follows: Ask the user to enter name, phonenumber, email....

In Python Create customer information system as follows:

Ask the user to enter name, phonenumber, email. Create a file by his name and save it in the hard disk. Do this repeatedly until all the users are entered. (for example, if the user enters 10 customers’s information, there should be 10 different files created.)

Now build the customer value for a retail company as follows:

Ask the customer to enter his name. If you have his information already stored, then showing him his stored number and email. If not, ask his phone and email and save on his name.

Ask him to enter what he buying (itemname, quantity, unit price.) repeatedly until he enters all the items. Calculate the total including the tax (0.0825). Append the total price to his file.

In: Computer Science

In c++, please make it short and simple A hotel chain needs a program which will...

In c++, please make it short and simple

A hotel chain needs a program which will produce statistics for the hotels it owns.

Write a program which displays the occupancy rate and other statistics for any of the chain’s large hotels (all are 20 floors with 16 rooms each floor).

In main:

-declare a 20 X 16 array of “int” named hotel to represent a hotel’s 20 floors and 16 rooms per floor.

Then in main, repeatedly:

-call a function which fills the hotel array with 1s and 0s, where 1 indicates an occupied room and 0 indicates an unoccupied room. Call a second function to validate that each entry is either 1 or 0 by having the second function access the original entry using a pointer in its parameter list.

-pass the hotel array to a third function which dynamically allocates a new size 20 “int” array with each element representing a floor of the hotel and the floor’s number of occupied rooms; place the number of occupied rooms of each floor into the new array and return it to main.

-display the floor number** and number of occupied rooms on each floor by incrementing the address of the new array.

-also calculate and display the hotel’s overall occupancy rate to 1 decimal (total rooms occupied per total rooms), and the floor number** and number of occupied rooms of the floor with the highest occupancy.

-process another hotel (unknown number of hotels in chain).

**NOTE: hotels do not have a floor numbered 13 due to guests’ superstitions.

To create your screen print, temporarily set the floors and rooms to 3 and 5 respectively to reduce data entry, and enter:

Floor #1: occupied, occupied, unoccupied, occupied, unoccupied

Floor #2: occupied, unoccupied, occupied, occupied, occupied

Floor #3: occupied, unoccupied, unoccupied, unoccupied, occupied

In: Computer Science

What are the enumerators for the following enumeration data declaration? A)enum test {RED, YELLOW, BLUE, BLACK};...

What are the enumerators for the following enumeration data declaration?

A)enum test {RED, YELLOW, BLUE, BLACK};

B)enum test {RED, YELLOW=4, BLUE, BLACK};

C)enum test {RED=-1, YELLOW,BLUE, BLACK};

D)enum test {RED, YELLOW=6, BLUE, BLACK};

In: Computer Science

Develop a VPython program creating an animation of your group’s object (a person walking up a...

Develop a VPython program creating an animation of your group’s object (a person walking up a flight up stairs) and cause it to move so that the animation simulates the motion of the object assigned. A .py file

In: Computer Science

Q1 Create a program that asks the user to input their budget. Then, it will ask...

Q1

Create a program that asks the user to input their budget. Then, it will ask the user to input each of their purchase until their entire budget is used up.

What kind of loop do you think is the most appropriate? You don't have to create the entire program. Part of it has already been created for you (see code below).

Note: Assume that the user always uses up their budget to the last cent and they don't over spend (is that really possible? :D )

You can use the following screen output to guide your program.

Please enter your budget: $2500.25
Please enter your purchase amount: $1200
Remaining balance: $1300.25
Please enter your purchase amount: $300.25
Remaining balance: $1000.00
Please enter your purchase amount: $1000.00
Remaining balance: $0.00

Skeleton code:

#include <iostream>
#include <iomanip>
int main() {
  double budget = 0, purchase = 0;
  std::cout << std::fixed << std::setprecision(2);
  std::cout << "Please enter your budget: $";
  std::cin >> budget;
  // place code here
  return 0;
}

Q2

Create a program that computes the summation of a number. For example, the summation of 3 would be 1 + 2 + 3.

What kind of loop do you think is the most appropriate? You don't have to create the entire program. Part of it has already been created for you (see code below).

You can use the following screen output to guide your program.

summation(n) program
Please enter n: 3
The summation(3) is 6
Skeleton code:
 
 
#include <iostream>
#include <iomanip>
int main() {
  int summation = 0, n = 0;
  std::cout << "summation(n) program";
  std::cout << "Please enter n: ";
  std::cin >> n;
  // provide code here
  std::cout << "summation("<< n << ") is: " << summation << "\n";
  return 0;
}

Q3

Question text

Create a program that asks the user to add all the values that a user inputs until they input -1.

What kind of loop do you think is the most appropriate? You don't have to create the entire program. Part of it has already been created for you (see code below).

Note: Be careful not to add the extra -1.

You can use the following screen output to guide your program.

Welcome to Summer-upper!
Please enter a number you want to add (type -1 to exit): 10
Please enter a number you want to add (type -1 to exit): 3
Please enter a number you want to add (type -1 to exit): 11
Please enter a number you want to add (type -1 to exit): -1
Sum is: 24
Skeleton code:
 
#include <iostream>
int main() {
  int sum = 0, input = 0;
  std::cout << "Welcome to Summer-upper!\n";
  // provide code here
  std::cout << "Sum is: " << sum << "\n";
  return 0;
}

In: Computer Science

Define the following terms. a) Heuristics b) Beam search c) Expert systems d) Best first search...

Define the following terms.

a) Heuristics b) Beam search c) Expert systems d) Best first search e) Blind search f) Informed search

In: Computer Science

Using Java, write a program that allows the user to play the Rock-Paper-Scissors game against the...

Using Java, write a program that allows the user to play the Rock-Paper-Scissors game against the computer through a user interface. The user will choose to throw Rock, Paper or Scissors and the computer will randomly select between the two. In the game, Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. The program should then reveal the computer's choice and print a statement indicating if the user won, the computer won, or if it was a tie. Allow the user to continue playing until they chooses to stop. Once they stop, print the number of user wins, losses, and ties.

In: Computer Science

Programming In C Write a program that prints the values in an array and the addresses...

Programming In C

Write a program that prints the values in an array and the addresses of the array’s elements using four different techniques, as follows:

  1. Array index notation using array name
  2. Pointer/offset notation using array name
  3. Array index notation using a pointer
  4. Pointer/offset notation using a pointer

Learning Objectives

In this assignment, you will:

  • Use functions with array and pointer arguments
  • Use indexing and offset notations to access arrays

Requirements

Your code must use these eight functions, using these names (in addition to main):

  1. printValuesNameIndex
  2. printValuesPointerIndex
  3. printValuesNameOffset
  4. printValuesPointerOffset
  5. printAddressesNameIndex
  6. printAddressesPointerIndex
  7. printAddressesNameOffset
  8. printAddressesPointerOffset

Requirements for the printValuesNameIndex Function

Purpose:

This function prints the values in the array.

Parameter:

integer array (square bracket notation)

Algorithm:

Print the name of the function, then print the values of the input array with array index notation. You must use the parameter. Do not declare any other variables except a loop control variable.

Return value:

None

Requirements for the printValuesPointerIndex Function

Purpose:

This function prints the values in the array.

Parameter:

Pointer to an int array

Algorithm:

Print the name of the function, then print the values of the input array with pointer index notation. You must use the parameter. Do not declare any other variables except a loop control variable.

Return value:

None

Requirements for the printValuesNameOffset Function

Purpose:

This function prints the values in the array.

Parameter:

integer array (square bracket notation)

Algorithm:

Print the name of the function, then print the values of the input array with pointer offset notation using the array name. You must use the parameter. Do not declare any other variables except a loop control variable.

Return value:

None

Requirements for the printValuesPointerOffset Function

Purpose:

This function prints the values in the array.

Parameter:

Pointer to an int array

Algorithm:

Print the name of the function, then print the values of the input array with pointer offset notation using the pointer. You must use the parameter. Do not declare any other variables except a loop control variable.

Return value:

None

Requirements for the printAddressesNameIndex Function

Purpose:

This function prints the address of each element of the array.

Parameter:

integer array (square bracket notation)

Algorithm:

Print the name of the function, then print the address of each element of the array with array index notation. You must use the parameter. Do not declare any other variables except a loop control variable. Use the appropriate format control string for printing addresses.

Return value:

None

Requirements for the printAddressesPointerIndex Function

Purpose:

This function prints the address of each element of the array.

Parameter:

Pointer to an int array

Algorithm:

Print the name of the function, then print the address of each element of the array with pointer index notation. You must use the parameter. Do not declare any other variables except a loop control variable. Use the appropriate format control string for printing addresses.

Return value:

None

Requirements for the printAddressesNameOffset Function

Purpose:

This function prints the address of each element of the array.

Parameter:

integer array (square bracket notation)

Algorithm:

Print the name of the function, then print the address of each element of the array with pointer offset notation using the array name. You must use the parameter. Do not declare any other variables except a loop control variable. Use the appropriate format control string for printing addresses.

Return value:

None

Requirements for the printAddressesPointerOffset Function

Purpose:

This function prints the address of each element of the array.

Parameter:

Pointer to an int array

Algorithm:

Print the name of the function, then print the address of each element of the array with pointer offset notation using the pointer. You must use the parameter. Do not declare any other variables except a loop control variable. Use the appropriate format control string for printing addresses.

Return value:

None

Requirements for main:

  1. Declare and initialize an integer array of size 5, using the values 10, 20, 30, 40 & 50.
  2. Call each function with the appropriate argument.

Other Requirements for this Program

No other variables should be declared in main or in any function or in any function parameter list, except those explicitly noted in the instructions.

You must a symbolic constant for the array size wherever it is needed.

All output must display exactly as it appears in the sample run. Note that your actual addresses may differ.

Sample Run

Printing array values from function printValuesNameIndex

a[0] = 10

a[1] = 20

a[2] = 30

a[3] = 40

a[4] = 50

Printing array values from function printValuesPointerIndex

a[0] = 10

a[1] = 20

a[2] = 30

a[3] = 40

a[4] = 50

Printing array values from function printValuesNameOffset

a[0] = 10

a[1] = 20

a[2] = 30

a[3] = 40

a[4] = 50

Printing array values from function printValuesPointerOffset

a[0] = 10

a[1] = 20

a[2] = 30

a[3] = 40

a[4] = 50

Printing array addresses from function printAddressesNameIndex

&a[0] = 62fe00

&a[1] = 62fe04

&a[2] = 62fe08

&a[3] = 62fe0c

&a[4] = 62fe10

Printing array addresses from function printAddressesPointerIndex

&a[0] = 62fe00

&a[1] = 62fe04

&a[2] = 62fe08

&a[3] = 62fe0c

&a[4] = 62fe10

Printing array addresses from function printAddressesNameOffset

&a[0] = 62fe00

&a[1] = 62fe04

&a[2] = 62fe08

&a[3] = 62fe0c

&a[4] = 62fe10

Printing array addresses from function printAddressesPointerOffset

&a[0] = 62fe00

&a[1] = 62fe04

&a[2] = 62fe08

&a[3] = 62fe0c

&a[4] = 62fe10

In: Computer Science

Case study: WIM’s transition to ERP Welding Industries Malaysia (WIM) is the only local Malaysian company...

Case study: WIM’s transition to ERP

Welding Industries Malaysia (WIM) is the only local Malaysian company that manufactures welding machines for commercial use. WIM’s remarkable success story, which includes surviving the 1997/8 financial crisis and the rise of competition from China, is attributable to the very effective enterprise resource planning (ERP) system it has adopted. In the past, WIM was using a materials resource planning (MRP) system, but this system, while a large advance over paper-based management techniques, nevertheless created many problems as the company’s operations expanded. MRP systems do not integrated information from various divisions within a company, but instead automate processes and information within departments. For WIM this meant there was no platform with which to integrate data from different departments, there was a prevalence of data duplication and redundancy, and inconsistent data were supplied to managers. In addition to this, the departments within the company were acting as separate entities and information was not being shared. The growing size of the firm and the corresponding increase in the sizes of departments also bogged down the flow of information. There were no predefined standards for data communications and information was often lost. In the absence of an enterprise-wide approach to information, WIM had a difficult time meeting production schedules. The lack of communication of vital information resulted in a loss of crucial resources; that is, people, material, and machinery. Senior management could not obtain a complete view of the company as a whole, but instead had to rely on piecemeal reports from each division. As Keng Foon Leong, General Manager, WIM, explained, “The local MRP system had the manufacturing modules, but it couldn’t manage huge data. We could not see our material movement on our previous system”. Overall productivity of the manufacturing process was falling, employees were disengaged and customers did not return. This set alarm bells ringing.

Based on the problems in their existing system, the management at WIM developed a set of objectives to guide the development of a new system. The objectives included an increase in the visibility and sharing of all reports on manufacturing; improved coordination across functional departments to increase efficiency; better management of procurement and inventory processes; the facilitation of day-to-day management; and the 24x7 availability of financial information of the entire firm. Management also demanded standardization of data formats across the company, and greater accuracy, along with remote access and improved security. They also decided that the inclusion of best practices and other vital information could lead to an increase in productivity and greater ownership.

After careful assessment, WIM decided to hire the services of Epicor Software Corporation for their ERP needs. Epicor is a software solutions provider to various enterprises in the manufacturing, distribution, retail, and service industries. Epicor has over 40 years of experience and has more than 20,000 customers in over 150 countries. “We reviewed a number of ERP vendors. We looked at each system and its functionality. Epicor stood out with its ability to link to our operations and provide the data we needed” said Leong. The first step was to put together a functional team comprising project management, IT systems managers, and executive management. The project management team defined the scope of the ERP system, assessed available resources at WIM, and budgeted the cost of implementation. The executive team ensured that the resulting system achieved business objectives and strategies, while technical expertise and support was provided by the IT team. A communication plan was designed to keep each individual member informed about current progress and the next steps in the plan. This was an essential part of change management at WIM. The system was implemented using a phased approach, since Epicor believes that key functionalities of the system need to be implemented in the first phase, followed by less major processes in the second phase, and so on.

ERP at WIM has changed the way the firm functions. The role of ERP in managing manufacturing processes now extends from procurement all the way to consumption. Holistic information on material, machinery, and labor, such as the cost structure of all raw materials, can now be accurately assessed. WIM is now able to utilize its resources to reap maximum profits. ERP has also integrated different departments at WIM, resulting in increased efficiency in operations at the firm. The manufacturing process can now be effectively and minutely planned using ERP, through the identification of the tasks and activities underlying each process, and the time required to complete them. The start and end times of sequences are estimated, and this enables the manufacturing process to be carried out smoothly, with any delays being immediately flagged up for further action, thus minimizing downtime. Better planning also facilitates effective monitoring of the process. In addition to these positive outcomes, the complexity of risk management and issue management is reduced thanks to the increased visibility of process information.

The implementation of Epicor’s ERP software has helped WIM to scale up its operations. As Leong explains, “Epicor provides us with greater visibility over our material movement and having an advanced MRP system within a comprehensive solution like Epicor is very important to the business.” The success of any manufacturing company also lies in how inventory is utilized. The software tracks and controls all procurement activities, schedules production processes, manages costs, and generates information that helps WIM to manage its inventory. It accurately forecasts the demand for materials and provides clear visibility into the lead time of ordered material. WIM purchases materials near the time of consumption, which leads to a reduction in maintenance of inventory levels in the organization. For instance, when quantities of a particular raw material exceed the minimum level or the maximum level respectively, an email alert is generated by the system to notify users, who can then decide whether to procure further quantities.

Furthermore, accurate information from all departments is recorded on the system, and this allows WIM to measure performance against key indicators in order to improve the quality of its business. As Leong notes, “Epicor has helped us to save money because we can make business decisions more clearly. We know that the data is accurate and the reports are correct. We can call on the Epicor system to support our decision-making process and let us make decisions faster and justify our spending.

Instructions: Read the above case and answer all following questions. Your answers must be clear, well-organized, and more importantly display in-depth analysis of the case.

  1. What problems led WIM to implement an ERP system?
  2. What strategic objectives (refer to chapter 1) WIM was trying to achieve through the implementation of the ERP system? Thoroughly analyze these strategic objectives by providing details.
  3. How did WIM manage the change from a local MRP system to Epicor’s ERP system? Identify specific phases of ERP implementation discussed in the case.

In: Computer Science

n Java, Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have...

n Java,

Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form

realPart + imaginaryPart * i

where i is square root of -1

Use floating-point variables to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it is declared.

Provide a no-argument constructor with default values in case no initializers are provided. Provide public methods that perform the following operations:

a) Add two Complex numbers: The real parts are added together and the imaginary parts are added together.   So, if we have (a + bi) + (c + di)), the result should be (a + c) + (b + d) i.

b) Subtract two Complex numbers: The real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is subtracted from the imaginary part of the left operand. So, if we have (a + bi) - (c + di)), the result should be (a - c) + (b - d) i.

c) Multiply two Complex numbers: The real part of the result is the real part of the right operand multiplies the real part of the left operand minus the imaginary part of the right operand multiply the imaginary part of the left operand. The imaginary part of the result is the real part of the left operand multiply the imaginary part of the left operand plus the imaginary part of the left operand multiply the real part of the right operand. So, if we have (a + bi) * (c + di)), the result should be (ac - bd) + (ad + bc) i.

d) Division two Complex numbers: We set the value of square real part of the denominator plus square imaginary part of the denominator is A. The real part of the result is the real part of the numerator multiplies the real part of the denominator plus the imaginary part of the numerator multiply the imaginary part of the denominator and divided by A. The imaginary part of the result is the real part of the left operand multiply the imaginary part of the left operand plus the imaginary part of the left operand multiply the real part of the right operand. So, if we have (a + bi) / (c + di)), the result should be (ac+bd)+i(bc-ad))/(c2+d2).

e) Print Complex numbers in the form (a, b), where a is the real part and b is the imaginary part.

A public class (Complex as in this assignment’s demo programs) should be implemented to do complex number calculation.

In the main function (ComplexTest as in the demo) you will instantiate two Complex class objects, call Complex class’s Addition, Subtraction, Multiply, Division function and print out the result of the calculations.

The following are the specifications for this assignment.

Complex.java

There are two private double data members (real and imaginary). The real stores the real part of a complex number and the imaginary stores the imaginary part of a complex number.

There are seven public functions (two Complex, add, subtract, multiply, division, and toString) in this classes.

  1. The first Complex function does not take any data. (or call no argument constructor) It initializes 0s to the private data members.
  2. The second Complex function takes two double numbers. (or call two-argument constructor) It assigns the two numbers to the private data members.
  3. The add function takes one Complex object and returns one Complex object. The function does two complex numbers addition.
  4. The subtract function takes one Complex object and returns one Complex object. The function does two complex numbers subtraction.
  5. The multiply function takes one Complex object and returns one Complex object. The function does two complex numbers multiplication.
  6. The division function takes one Complex object and returns one Complex object. The function does two complex numbers division.
  7. The toString function returns a String object but does not take any data. The function returns a parenthesis string which represents complex number. The numbers are in floating point format with only one digit after decimal point.

ComplexTest.java

It contains main function (driver) for this assignment. In the main function you have to do

  1. Create two Complex objects with value of (9.5, 7.7) and (1.2, 3.1).
  2. Print a proper formatted headline “A complex number in the form (x, y) is equal to x + yi, where i is square root of -1.”
  3. Print a second headline "*-Complex numbers calculations-*".
  4. If an object contains (9.5, 7.7 ) and b object contains ( 1.2, 3.1 ). The program will use System.out.printf function to display information by calling a.toString(), b.toString(), a.add( b ).toString(), a.subtract( b ).toString(),a.multiply( b ).toString(), and a.division( b ).toString() as arguments.

In: Computer Science

Using a text editor, create a file english.txt containing the following words: yes no go come...

Using a text editor, create a file english.txt containing the following 
    words:
    
    yes no go come thanks goodbye
    
    Create a second file chinese.txt contain the following words:
    
    shi bu qu lai xiexie zaijian
    
    Write a program that reads the words from english.txt so that
    the successive slots of a char * array english point to them. 
    Use the %s conversion code in a fscanf call to read one word
    at a time.
             
    Similarly, read the words from chinese.txt so that the 
    successive slots of a char * array chinese point to them.
    
    Your program should then execute a loop that prompts the user 
    for an English word, reads it in (use scanf), and then 
    displays the corresponding Chinese word. The loop should 
    continue until the user enters the word "done". 

In: Computer Science

In C, take the following programming that initializes 2 arrays and swaps them and displays the...

In C, take the following programming that initializes 2 arrays and swaps them and displays the initial input and output and modify it so that it uses different functions for the swapping and printing, so that the main method only has variables and function calls.

#include<stdio.h>

int main()
{
    const int n = 5;

    int firstArray[n], secondArray[n];

    int i, k=0, temp;

    for(i=0, k=0; k<n; i+=2, k++){

        firstArray[k] = i;

        secondArray[k] = i+1;
}
    printf("Before Swap\n");

    for(i=0; i<n; i++)
    {
        printf("firstArray[%d] = %d, secondArray[%d] = %d\n", i, firstArray[i], i, secondArray[i]);
    }
    //swapping

    for(i=0; i<n; i++)
    {
        temp = firstArray[i];

        firstArray[i] = secondArray[i];

        secondArray[i] = temp;
    }
    printf("After Swap\n");

    for(i=0; i<n; i++)
    {

        printf("firstArray[%d] = %d, secondArray[%d] = %d\n", i, firstArray[i], i, secondArray[i]);
    }
    return 0;
}

In: Computer Science