Questions
What are the advantages of filtering using Slicers over using filtering in Excel?

What are the advantages of filtering using Slicers over using filtering in Excel?

In: Computer Science

I. Answer part A,B, C and D. 1a) Count the number of times a given char...

I. Answer part A,B, C and D.

1a)

Count the number of times a given char occurs in a given range of a String parameter (i.e. starting at a given start index, and up to but not including and end index). If end is greater than the length of the String, then the method should stop looking at the end of the String.


countCharsInRange("java", "v", 1, 2) → 0
countCharsInRange("java", "v", 0, 2) → 0
countCharsInRange("java", "v", 0, 3) → 1

1b)

Return a new String that removes all copies of the given char ch from the given String

removeChar("dog", "o") → "dg"
removeChar("cat", "o") → "cat"
removeChar("aaa", "a") → ""

1c)

Return the number of times the letter 'a' is directly followed by the letter 'b' in the given String.


countAB("abc") → 1
countAB("wxyz") → 0
countAB("bcaca") → 0

1d)

Return a new String that is a copy of the given String with each character copied the given number of times. Assume that n is 0 or more.


eachCharNTimes("abc", 2) → "aabbcc"
eachCharNTimes("xyz", 3) → "xxxyyyzzz"
eachCharNTimes("a", 5) → "aaaaa"

In: Computer Science

Project : facial recognition system use the DEEP method to reflective writing. The four steps in...

Project : facial recognition system

use the DEEP method to reflective writing. The four steps in this method are:

  • 2.1 D - Describe experience (past or present).
    1. Describe the problem
  • 2.2 E - Explore or consolidate new learning
    1. Read/Research about the problem
  • 2.3 E - Evaluate/analyse/self reaction
  • 2.4 P - Plan future learning

In: Computer Science

How would you describe some of the ER design limitations, and discuss how understanding these limitations...

How would you describe some of the ER design limitations, and discuss how understanding these limitations will influence how you choose to model a particular situation so that you are able to represent the things that are most important?

In: Computer Science

Consider an array A[1 · · · n] which is sorted and then rotated k steps...

Consider an array A[1 · · · n] which is sorted and then rotated k steps to the right. For example, we might start with the sorted array [1, 4, 5, 9, 10], and rotate it right by k = 3 steps to get [5, 9, 10, 1, 4]. Give an O(log n)-time algorithm that finds and returns the position of a given element x in array A, or returns None if x is not in A. Your algorithm is given the array A[1 · · · n] but does not know k. You can use C, C++, Java, or Python to solve this problem (ask the instructor if you have another programming language in mind). Python3 pls

In: Computer Science

*** Using Python *** Your program must prompt the user for their city or zip code...

*** Using Python ***

Your program must prompt the user for their city or zip code and request weather forecast data from openweathermap.org. Your program must display the weather information in an READABLE format to the user.

Requirements:

  • Create a Python Application which asks the user for their zip code or city.
  • Use the zip code or city name in order to obtain weather forecast data from: http://openweathermap.org/
  • Display the weather forecast in a readable format to the user.
  • Use comments within the application where appropriate in order to document what the program is doing.
  • Use functions including a main function.
  • Allow the user to run the program multiple times.
  • Validate whether the user entered valid data. If valid data isn’t presented notify the user.
  • Use the Requests library in order to request data from the webservice.
  • Use Python 3.
  • Use try blocks when establishing connections to the webservice. You must print a message to the user indicating whether or not the connection was successful.

*** also formatted into imperial units. Site defaults into Kelvin. ***

In: Computer Science

1. What is the fundamental equation that guides changes to a weight wij in a BP...

1. What is the fundamental equation that guides changes to a weight wij in a BP network.   Describe its components.

2. Multi-layer BP neural networks have no proof of converging to an optimal solution. Is this true? If it is, then why do we bother to use them?

In: Computer Science

In this assignment you are going to create a Student class to demonstrate a Student object....

In this assignment you are going to create a Student class to demonstrate a Student object. Then create a StudentTest class to place the main method in, which demonstrates the Student object.

Student class should have the following instance variables:

  • firstName, middleName, lastName (String)
  • id (int)
  • grade (int)

Student class should have the following methods:

  • Set and Get methods for each variable
  • Constructor that sets all variables using Set methods that you defined.

Design the application in main that you create 10 student objects in main. You don’t need to get the input from the user; just provide some values you prefer. Also, create an ArrayList of type Student in main.

Once you create 10 student objects, add these objects into the ArrayList. Using enhanced for loop (which we sometimes call foreach loop), display the information of every student in your ArrayList

In: Computer Science

Safaricom service provider has assigned you a task in their software section to design an application...

Safaricom service provider has assigned you a task in their software section to design an application that can be used by wholesalers to buy their products. Your duty is to implement the data structure which can be used to store the inventory of the warehouse containing the products. The data structure should be able to add a product with an associated code indicating its likelihood to spoil, remove a product that is most likely to spoil, and return the overall number of products in the inventory.

i.          Describe the data structure you would use and give reasons.

ii.         With reference to algorithms, explain the terms time efficiency and space efficiency.

iii.        Describe a non-linear data structure. Give examples and operations in which you might perform on such a structure.         

In: Computer Science

C++ Question 2 You will read in data about the planets from a text file, and...

C++ Question 2

You will read in data about the planets from a text file, and then print out the data about that planet when the user requests the data. You will need to create a Planet Class (since this assignment does not cover templates, you are expected to split your class into .cpp and .h files), as well as a .cpp/.h library with the functions described below

Planet Class

For the first phase of the question, you will create a Planet class.

Include the iostream and fstream libraries in the Planet class so we can do the friend operator<<

Before the class definition, create a const integer that defines the number of planets as 9. (Yes, I am counting Pluto for the purposes of this assignment.)

The Planet class should have the following private members:
*
* A std::string with the planet's name
* A double that is the mean distance from the sun
* A double that is the circulation time around the sun
* A double that is the rotation time around own its own axis
* A long unsigned int that is the planet's equatorial radius in kilometers ;
* A double that is the planet's mass compared to earth ;
* An unsigned int that is the planet's number of moons ;

You will need to create a constructor that takes in all these values and stores them using a member initialization list.
* Remember that your member initialization list must be in the same order as the private members are listed in the class definition. Recall the reason why: we want to ensure effective pointer arithmetic when allocating these elements, so putting them in order will make your program run more efficiently.
Next, you should write a method that returns the Planet's Name.

Next, you should write an overloaded friend operator that prints out the information regarding the Planet. You may reference the format below to see a good output format. Here are a couple of crucial details to make it work:
* You will need to multiply the mean distance from the sun by 149500000 to get the number of kilometers
* Remember my "rules" for creating a friend operator<< in .h and .cpp
* Remember the importance of const and call by reference in the overloaded operator.

Function Library

For the second phase of the assignment, you will create functions to call the Planet objects, and these functions will be called in main

First, be sure to include the Planet.h library for the class

Second, include string and vector libraries in this .h file

You will need to write two functions in the .h/.cpp files

void getPlanets( std::ifstream& ifs, std::vector< Planet >& thePlanets );
In main, you will create an ifstream and a vector of Planets. In this file, you will read in from the file information about the Planets. The information is stored in the exact order that we made in the class.

The data may be found here at PlanetData.txt:

Mercury 0.387 0.241 58.815 2433 0.05 0
Venus 0.723 0.615 224.588 6053 0.82 0
Earth 1.000 1.000 1.000 6379 1.00 1
Mars 1.523 1.881 1.029 3386 0.11 2
Jupiter 5.203 11.861 0.411 71370 317.93 12
Saturn 9.541 29.457 0.428 60369 95.07 10
Uranus 19.190 84.001 0.450 24045 14.52 5
Neptune 30.086 164.784 0.657 22716 17.18 2
Pluto 39.507 248.35 6.410 5700 0.18


Use the while( ifs.good() ) to loop through the file. In each loop, create a temporary variable for each element, and then read in using the ifs >> operator. Once read in, create a temporary Planet using the constructor you wrote. Then, push that temporary Planet onto the vector.

bool getPlanetNameFromUser( std::string& planetName );

Prompt the user to enter a value from the command line, or "End" to terminate. If the user entered end, call exit(-1) to end the program. Otherwise, return true. planetName will store the value. Calling planetName by reference will save the input.


Main Program

For the third phase of the question, you will develop the program itself. In the main program:
* create a std::vector of Planets and an std::ifstream. (You may hardcode the Planet file into this program instead of reading from the command line)
* Then get the Planets from the file.
* Create a string to store the user's response
* Using a while loop, Get the Planet Name From the User and use the bool to determine whether to continue
* When we go inside the loop
* Create a long unsigned int to loop
* Iterate through the vector, and compare the Planet's name in each Planet in the vector
* For this internal while loop, it is important to check if the long unsigned int is less than the number of planets, and then check to see if the Planet's name is equal to the input
* Otherwise, you will get major issues with segmentation faults
* After the while loop completes, make an if statement
* First, check if the iteration value is less than the number of planets (for the same reason)
* Next, check if the name at the Planet at the iter location is equal to the string input by the user
* If both tests pass, use the Planet's operator<< to print the information to the user.

In: Computer Science

What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear...

What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them.

In: Computer Science

, design the information security of an organization

, design the information security of an organization

In: Computer Science

The need to build a new infrastructure to utilize digital technology is constantly increasing, but it...

The need to build a new infrastructure to utilize digital technology is constantly increasing, but it is difficult to secure new infrastructure by increasing the number of system resources required indefinitely. If the cost of IT infrastructure is calculated by adding up (1 )fixed and (2) operational costs, what difference will each cost show before and after the introduction of the cloud?

In: Computer Science

Discuss the interdependence that exists between Database System Development Life Cycle stages.

Discuss the interdependence that exists between Database System Development Life Cycle stages.

In: Computer Science

Q1(a) A class named “Employee” holds information like employee code, name,gender, year of joining. Write a...

Q1(a) A class named “Employee” holds information like employee code, name,gender, year of joining. Write a program in C++ to create three objects of employee and enter some data into it through setters. Make getters and setters for all employee information. Then ask the user to enter current year. Display the names of those employees whose tenure is 2 or more than 2 years according to the given current year only using getters

(b)A class named “Employee” holds information like employee code, name,gender, year of joining. Write a program to create five hundred objects (Array of employee objects )of employee and enter some data into it through setters. Make getters and setters for all employee information. Then ask the user to enter current year. Display the names of those employees whose tenure is 5 or more than 5 years according to the given current year only using getters.
Note: employee code is automatically assigned to newly created object by calling default constructor

(b) Define a class StudentReport with the following specification:
Private members :
adno 4 digit admission number
name 20 characters
marks an array of 5 floating point values
average average marks obtained
GETAVG() a function to compute the average obtained in five subject
Public members:
READINFO() function to accept values for adno, name, marks. Invoke the function   
GETAVG()

DISPLAYINFO() function to display all data members of StudentReport on the screen.
You should give function definitions outside the class using scope resolution operator.

Use C++ to answer

In: Computer Science