In: Computer Science
s = [1,1,2,2,2,9,-5,-10,8,0]
In: Computer Science
Using C++
There are number of cable company in southern California which offer number of services
for customers. This company have two types of customers:
Residential and business. There are two rates for calculating a cable bill: one for Residential customers and one for business customers.
For residential customers the following rates apply:
For business customers the following rates apply:
Input:
The customer’s account number,
Customer code
Number of premium channels
And in case of business customers, number of basic service connections
What to deliver (output) Customers’ account number and the billing amount
Run your program for the given data:
Enter customer code: R or r (Residential) or B or b (Business) B
Enter number of service connections 16
Enter number of premium channels 8
Display total billing amount:
Run for residential customers:
R
Test your program for 12 premium channels.
flow chart, pseudo code are required for every projects and activities.
In: Computer Science
Objective: The purpose of this assignment is to introduce declaration of list objects, the forstatement and the def keyword used to define functions.
Problem: Write a Python module (a text file containing valid Python code) named p3.py. This file will contain the following.
Definition of a list containing strings which are in turn integers. These integers represent years, which will be used as inputs to the next item in the file
Definition of a function named isLeap. This function must accept a string containing an integer that will be interpreted by this function as a year. If the year is prior to the introduction of the Gregorian calendar, it will print “Not Gregorian.” If the year is aGregorian year and a leap year, it will print “Leap year!”. If the year is a Gregorian year butnot a leap year, it will print “Not a leap year!”.
A for loop that will call isLeap with each of the year strings in the list of year strings defined above.
While you are free to use any name for your list of year strings, you must use the name isLeap for the function.
Submission: Submit the code you write in a text file named p3.py to the Blackboard folder for this assignment.
Also –
As you implement the code for this assignment, consider what might be added to the testing process and program output to make it clearer what the unit testing is accomplishing. For up to five points extra credit, you also submit a Word document describing any improvements you think would help in testing the function you created, including any additional output that would be useful or testing cycles.
In: Computer Science
Define cloud computing and explain the three key terms in your definition. Then
Describe the differences between mainframe, client-server, and cloud architectures.
In: Computer Science
Explain the difference between scalability and elasticity. And List and briefly explain factors that encourage organizations to move to the cloud?
In: Computer Science
Please use Java language! with as much as comment! thanks!
Write a program that displays a frame with a three labels and three textfields. The labels should be "width:", "height:", and "title:" and should each be followed by one textfield. The texfields should be initialized with default values (Example 400, 600, default title), but should be edited by the user. There should be a button (label it whatever you want, I don't care). If you click the button, a new frame should become visible that has the title and dimensions the user entered in the textfields on the first frame (or the default values, if the user did not enter anything).
Use JPanels and the EXIT_ON_CLOSE statement. Give the first panel some proper dimensions using the setSize method.
In: Computer Science
(Note: For parts b, c and
d, your code must clearly print out the required quantities when
executed. The display on screen must clearly say what quantity is
being printed (eg: “The mean is: 3.45”, etc.).
The included spreadsheet
https://1drv.ms/x/s!ApVa8VAkzZo-aW5eXs8WmFBLivw
I can also post the file in the comments if that would be helpful.
In: Computer Science
In: Computer Science
Question 12
The protection of data from unauthorized modification or destruction is an example of data ___________
Question 12 options:
confidentiality |
|
1integrity |
|
availability |
|
authentication |
Question 13
In a public key encryption system, any person can encrypt a message using the receiver's ______.
Question 13 options:
public key |
|
private key |
|
Both A and B |
|
Neither A nor B |
Question 14
__________ is concerned with protecting student educational records
Question 14 options:
HIPPA |
|
CISO |
|
GLBA |
|
FERPA |
Question 15
__________ is the ability to correlate, with high certainty, a recorded action with its originating individual or entity.
Question 15 options:
Authentication |
|
Confidentiality |
|
Integrity |
|
Non-repudiation |
Question 16
_______________ requires companies to maintain financial records for seven years.
Question 16 options:
HIPPA |
|
Sarbanes Oxley Act |
|
GLBA |
|
FISMA |
Question 17
Which of the following statement is true comparing MANET with infrastructure based WLAN?
Question 17 options:
MANET generally has better performance in term of speed |
|
MANET has less complicated routing mechanism |
|
MANET is more tolerate to single point of failure |
|
WLAN generally supports more flexible network topology |
In: Computer Science
Write two classes, ToDoList and Driver
ToDoList should implement the following UML class diagram:
ToDoList |
---|
-list:String[] -size:int |
+ToDoList() +add(String item):void +remove(String item): boolean +toString():String |
add(String item) should add the item as the last element in the list, updating size.
remove(String item) should remove the
item and return true, or, if the
item was not in the list, return
false.
To remove the item, check every
list element from 0 to
size-1, and if that item is equal to the parameter
using s1.equalsIgnoreCase(s2), loop from
i+1 to size, assigning each
element the value of the following element in the list, so
list[j-1] = list[j]. The size of
the list will be one less.
toString() should return a numbered list, with a "\n" after each list item.
HW22 should run as in the sample run below. Use static methods as needed to input the choice and the list item.
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: j
Enter a number: 6
1 through 4 only: 3
Empty list
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 1
Enter a list item and press enter: Mow the lawn
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 1
Enter a list item and press enter: Wash the car
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 1
Enter a list item and press enter: Clean the kitchen
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 3
1. Mow the lawn
2. Wash the car
3. Clean the kitchen
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 2
Enter a list item and press enter: clean the kitchen
clean the kitchen removed
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 3
1. Mow the lawn
2. Wash the car
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 2
Enter a list item and press enter: Write a program
Could not remove Write a program
1. add an item
2. remove an item
3. print the list
4. quit
Enter your choice: 4
add(String item) should add the item as the last element in the list, updating size.
remove(String item) should remove the item and return true, or, if the item was not in the list, return
In: Computer Science
Write an inline assembly program that initialized a 100 byte area of memory using the STOS instruction.
In: Computer Science
In C++, Write a program that accepts exactly ten (10) integer numbers from the user. When the user is done inputting these numbers, the program prints back: (i) the sum of the 10 numbers, (ii) the minimum value from the 10 numbers, and (iii) the maximum value from the 10 numbers.
In: Computer Science
In: Computer Science
This task is solved in Python 3.
Develop a function which counts the number of vowels in a text.
>>> numberofVowels ("There is a cat outside the house")
13
In: Computer Science