What is a first-class function? Provide two scenarios where you would implement this concept.
In: Computer Science
Show that Boruvka's algorithm has O(lgV) iterations.
In: Computer Science
In: Computer Science
Demonstrate your knowledge of creating business documents, by adhering to
organisational requirements, in terms of style, layout format etc. You may wish
to refresh yourself of the organisation’s particular style requirements.
You should create two separate documents; this will allow you to show how you
can apply standardised formatting to different types of documents.
You may ask your instructor for advice on which documents to produce, or they
may specify which ones they want you to produce.
By completing this assessment, you will have demonstrated your knowledge of;
Keyboarding and computer skills
Literacy skills
Problem solving skills
Numeracy skills
Appropriate technology
Computer applications
Organisational policies, plans and procedures
Organisational requirements for document design
Please give me any details or example that you can think of. thank you in advance
In: Computer Science
Provide SQL Statement for the ff queries:
1. List the total computer offer value in Stevens Point
2. List of the computer transactions ordered by transaction value in descending order
3. List of the number and average value of computer requests in Wausau
4. List the number and average value of computer transactions
Tables are :
Tb_Product
Prod_ID, Name, MU
Tb_Offers
Supp_ID, Prod_ID, Price, Quantity
Tb_Transactions
Tran_ID,Supp_ID, Con_ID, Prod_ID, Price, Quantity
Tb_Suppliers
Supp_ID, Name, City
Tb_Request
Con_ID, Prod_ID, Price, Quantity
In: Computer Science
Problem 14.1.2 Let M be a DFA with transition function δ. Prove carefully, by induction for all strings w over M’s alphabet, that δ ∗ (i, w) = j if and only if there is a path from node i to node j in the graph of M such that the labels on the edges of the path, read in order, form w.
In: Computer Science
Discuss your rationale for choosing the specific firewall in question, and determine the primary way in which a company could incorporate it into an enterprise network in order to enhance security. Select the two (2) most important and / or unique features of the chosen firewall, and explain the primary reasons why those features make the firewall a viable option in enterprises today. Justify your answer. Discuss what you believe to be the two (2) most important security considerations related to cloud deployments, and explain the main reasons why you believe such considerations to be the most important.
In: Computer Science
Create a program that has an App Class which holds your main() method and create a Band class.
Create an array of 5 Band objects in your main() method.
Each band should have it's own compete() method along with a a drummer, vocalist, and piano player.
Each band should have the names of the drummer, vocalist, and piano player.
The complete method() assigns a random score between 0 and 20 to to each band.
Create a method to calculate the top 2 winners from highest score to least and write each band's information to a "winners.txt" file.
A grabInfo() method should be called to display a band's information.
In: Computer Science
Please separate this code with different header files thank you.
#include<iostream>
//bismark
using namespace std;
public:
class Circle {
private double radius;
private char color;
private boolean filled;
public Circle(double radius, char color, boolean
filled) {
super();
this.radius = radius;
this.color = color;
this.filled = filled;
}
public Circle() {
super();
this.radius = 0;
this.color = 'W';
this.filled = false;
}
public Circle(double radius) {
super();
this.radius = radius;
this.color = 'W';
this.filled = false;
}
public double getRadius() {
return radius;
}
public void setRadius(double radius) {
this.radius = radius;
}
public char getColor() {
return color;
}
public void setColor(char color) {
this.color = color;
}
public boolean isFilled() {
return filled;
}
public void setFilled(boolean filled) {
this.filled = filled;
}
public double getCircumference(double r)
{
return 2 * 3.14*r;
}
public double getArea(double r)
{
return 3.14*r*r;
}
}
In: Computer Science
problem 1 Write a function to search an item named searchkey in an array of 20 elements. Assumed the array has all integer value and also the search item is an integer.
problem 2 Now consider the array is sorted. Modify the above script (from question 1) in a way so that dont have to search the item in every position of the array( not looking 20 times considering worst case scenario).
thanks in advance
In: Computer Science
Prove that the following problem is in NP: Given a digraph G over n vertices (n is an even number), does G contain 2 vertex-disjoint simple cycles in which each cycle is of length n/2?
In: Computer Science
A Private Poly Clinic in City wish to develop software to automate their Patient Monitoring system for storing the details of the patients visited the clinic. Develop a system to meet the following requirements:
|
Patient Id |
Fees in (OMR) |
Gender |
|
P001 |
15 |
M |
|
P002 |
10 |
F |
|
P003 |
20 |
M |
|
P004 |
8 |
F |
|
P005 |
12 |
M |
Read the fees paid by ‘N’ patients into a one dimensional array in random order. Develop an algorithm, flow chart and write a C program to arrange the fees read in ascending order. Display the result with appropriate statements.
In: Computer Science
Assume the following declarations have been made:
-----------------------------------
char item[50];
char guess;
-----------------------------------
Furthermore, suppose that all of the elements of an item have
already been initialized, and that the user has already entered a
value for guess.
Write a code fragment to find and print out each index i for which
item[i] is the same as guess.
Be sure to specify any additional necessary variable declarations.
As an example, consider the case where the rst 10 elements of item
are (in order)
'a', 'b', 'c', 'd', 'a', 'b', 'b', 'c', 'f', 'a',
and the remaining elements are all 'y'. If guess were 'b', then
your code should print out the following indices:
1 5 6
In: Computer Science
Python 3.5:
Consider the Account class that we developed previously.
Task 1:
Review the code in the constructor in the Account class. What happens if we attempt to make a new account with a negative balance? Use exception handling to raise an exception if a balance less that 0 is given. Add a message to the constructor saying "Warning! Your balance is equal to or less than 0!".
Task 2:
Next, in the Account class's withdraw() method, add code to check if the amount given exceeds the account's balance. If it does, then raise a ValueError. Add a message to the withdraw() method saying "ERROR: Insufficient funds!". The balance in the account should remain unchanged.
Also, add code to check if the amount of withdrawal is zero. You should raise a ValueError if the amount is less than or equal to zero.
Note: you must submit the entire class definition.
For example:
| Test | Output |
| try: account1 = Account(1122, 0, 3.35) except ValueError as x: print (x) |
Warning! Your balance is equal to or less than 0. |
| try: account2 = Account(1122, 100, 3.35) account2.withdraw(200) except ValueError as x: print (x) print(account2.get_balance()) |
ERROR: Insufficient funds! 100 |
| try: account2 = Account(1122, 100, 3.35) account2.withdraw(0) except ValueError as x: print (x) print(account2.get_balance()) |
ERROR: Invalid amount! 100 |
Account Code:
------------------------------------------------------
class Account:
def __init__(self, id, balance: int=None, annual_interest_rate:
int=None):
if balance > 0:
self.__id = id
if balance == None:
self.__balance = 100
else:
self.__balance = balance
if annual_interest_rate == None:
self.__annualInterest = 0
else:
self.__annualInterest = annual_interest_rate
else:
raise ("Warning! Your balance is equal to or less than 0!")
def get_id(self):
return self.__id
def get_balance(self):
return self.__balance
def get_annual_interest_rate(self):
return self.__annualInterest
def get_monthly_interest_rate(self):
return (self.__annualInterest/12)
def get_monthly_interest(self):
return (self.__balance * (self.__annualInterest/12)/100)
def deposit(self, amount: int=None):
if amount == None:
deposit = 0
else:
deposit = amount
self.__balance = self.__balance + amount
return
def withdraw(self, amount: int=None):
if amount == None:
withdraw = 0
else:
withdraw = amount
self.__balance = self.__balance - withdraw
return
def get_balance(self):
return self.__balance
In: Computer Science
1. Draw a use case diagram for the selected project and identify the classes in the domain with attributes, functions, and relationships among classes. (State your assumptions clearly).
2. Design a database for the selected project. Please draw the following diagrams necessary to develop your database.
a. ER-diagram (Entity-relationship diagram)
b. Normalization of the database up to 3rd normal form. (Only if needed, if not needed justify).
My selected project is:
Develop a system to automate membership details and time allocation for swimmers in a swimming club. All users should take membership and pay monthly for usage. Usage could be with a coach or without. The program should produce and income report for a given month
In: Computer Science