In: Computer Science
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 this method are:
In: Computer Science
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 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 and request weather forecast data from openweathermap.org. Your program must display the weather information in an READABLE format to the user.
Requirements:
*** 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 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. Then create a StudentTest class to place the main method in, which demonstrates the Student object.
Student class should have the following instance
variables:
Student class should have the following
methods:
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 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
In: Computer Science
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
In: Computer Science
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.
In: Computer Science
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