Questions
THIS IS JAVA PROGRAMMING Design a class named Account (that contains 1. A private String data...

THIS IS JAVA PROGRAMMING

Design a class named Account (that contains

1. A private String data field named id for the account (default 0).

2. A private double data field named balance for the account (default 0).

3. A private double data field named annualInterestRate that stores the current interest rate (default 0).

4. A private Date data field named dateCreated that stores the date when the account was created.

5. A no-arg constructor that creates a default account.

6. A constructor that creates an account with the specified id and initial balance.

7. The accessor and mutator methods for id, balance, and annualInterestRate.

8. The accessor method for dateCreated.

9. A method named getMonthlyInterestRate() that returns the monthly interest rate.

10. A method named withdraw that withdraws a specified amount from the account and returns a boolean based on sufficient funds.

11. A method named deposit that deposits a specified amount into the account, and returns a boolean

12. A method call toString() that returns a “nicely formatted” string similar to the following:

ID: 1234567

Balance: $53,823.27

InterestRate: 0.036

Date Account Created: 10/23/2018

Draw the UML diagram for the class. Implement the class (write the Java code as specified by the UML diagram). Use the Lab7 test program (attached to dropbox) that creates an Account object with an account ID of 5544, a balance of $45,000.00 and an annual interest rate of 3.6%. Use the withdraw method to withdraw $3,700.00, use the deposit method to deposit $2,200.00 and print the balance, the monthly interest, and the date this account was created. Keep in mind that while this tester has hard-coded values, the Account class should be usable by a full-blown application. As such, refrain from having Account.java print messages or accepting input from the keyboard.

In: Computer Science

Write a function in Matlab that takes as input the number n and a symmetric tridiagonal...

Write a function in Matlab that takes as input the number n and a symmetric tridiagonal matrix given as two vectors: n×1 vector v representing the main diagonal and (n−1)×1 vector w representing the upper diagonal. Have this function output the Cholesky factor of the matrix as a vector for the main diagonal and a vector for the upper diagonal and output the number of flops and, separately, the number of square roots used as well. Use only basic programming.

(a) Write out or print out your function.

(b) Run the case with v =2*ones(10,1), w = -ones(9,1) and write out or print out all your results.

(c) Rune the case with v =2*ones(100,1), w =-ones(99,1) and write out or print out your results just for the number of flops and square roots used. How many times more flops are used than in the previous case?

In: Computer Science

Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back...

Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back policy. The following requests are made to memory:
Load: 0b0011111001000101
Load: 0b1000111110110100
Load: 0b0110101111110100
Store: 0b0010110000000110
Store: 0b1111001001110101
Store: 0b1110000111000001
Load: 0b0000000010100110
Load: 0b0101001001001101
Assuming the machine is in cold-start, profile the contents to the cache after all of the requests have been made. State any assumption you make (if needed).

In: Computer Science

How long should a key be used before it is replaced? Search the Internet for information...

How long should a key be used before it is replaced? Search the Internet for information regarding cryptoperiods for hash, symmetric, and asymmetric algorithms. Find at least three sources for each of the algorithms. Write a summary of what you find in regards to the recommended times and figure the average time between all three of your sources. Do you agree with the average time for a hash, symmetric, and asymmetric algorithms? What would you recommend for each? Why? Please make sure it is 150 words.

In: Computer Science

Pick at least one of the buttons or menu items in MS Word not covered in...

Pick at least one of the buttons or menu items in MS Word not covered in this class' Word Modules. What is its name, and where is it located in the MS Word interface? What does it do? How have you or might you use it in an MS Word document to make your work products better? Explain how to transform, or export, do a layout, design, or it can make a flyer or,insert, a document must be 230- 250-word discussion any one of these.

In: Computer Science

Use the Internet to research defenses against cross-site attacks (XSS and XSRF). What are the common...

Use the Internet to research defenses against cross-site attacks (XSS and XSRF). What are the common defenses? How difficult are they to implement? Why are these defenses not used extensively? Write you finding here in your original post. Minimum 150 words for your response.

In: Computer Science

Question 22 What is the most common patch remediation frequency for most organizations? 1 point As...

Question 22

What is the most common patch remediation frequency for most organizations?

1 point

As soon as they are released.

Weekly

Monthly

Annually

23.

Question 23

In Windows kernel mode, what stops a misbehaving driver from impacting other processes?

1 point

The Windows Virtual Address Manager.

Each process runs in its own dedicated virtual address space.

The Windows Process Director.

Nothing.

24.

Question 24

In Linux, Bash, tcsh and sh are what?

1 point

Shells

Commands

Directories

Distros

25.

Question 25

Symmetric key encryption ensures which of the following?

1 point

Confidentiality only.

Confidentiality and Availability.

Confidentiality, Integrity and Availability.

Confidentiality and Integrity.

26.

Question 26

Which statement is True of Hash functions?

1 point

Hashing is a reliable way to assure the integrity of a message.

Using hashing is a good way to assure the confidentiality of the messages you send.

Hashes are becoming easier to reverse engineer since computers are becoming more powerful.

The length of the hash string is proportional to the length of the input so the approximate message length can be derived from a hash.

27.

Question 27

Which of the following statements about hashing is True?

1 point

The original message can be retrieved from the hash if you have the encryption key.

A weakness of hashing is that the hash is proportional in length to the original message.

Hashing uses algorithms that are known as “one-way” functions.

If you have two hashes that differ only by a single character, you can infer that the original messages also differed very little.

28.

Question 28

Which statement about encryption is True about data in use.

1 point

It is vulnerable to theft and should be decrypted only for the briefest possible time while it is being operated on.

Short of orchestrating a memory dump from a system crash, there is no practical way for malware to get at the data being processed, so dump logs are your only real concern.

Data in active memory registers are not at risk of being stolen.

Data should always be kept encrypted since modern CPUs are fully capable of operating directly on encrypted data.

29.

Question 29

For added security you decide to protect your network by conducting both a stateless and stateful inspection of incoming packets. How can this be done?

1 point

Install a single firewall that is capable of conducting both stateless and stateful inspections.

You must install the stateful and stateless firewalls in parallel with an intelligent switch in front of them to direct the packets to one or the other as appropriate.

You must install 2 firewalls in series, so all packets pass through the stateless firewall first and then the stateless firewall.

Install a stateful firewall only. These advanced devices inspect everything a stateless firewall inspects in addition to state related factors.

30.

Question 30

Which statement best describes configuring a NAT router to use dynamic mapping?

1 point

The organization will need as many registered IP addresses as it has computers that need Internet access.

The NAT router uses each computer's IP address for both internal and external communication.

Unregistered IP addresses are mapped to registered IP addresses as they are needed.

Many unregistered IP addresses are mapped to a single registered IP address using different port numbers.

31.

Question 31

If a computer needs to send a message to a system that is not part of the local network, where does it send the message?

1 point

The computer's IP address.

The computer's domain name.

The computer's MAC address.

The network's default gateway address.

The network's DNS server address.

The network's DHCP server address.

In: Computer Science

Minimum Requirements: Your website must include appropriate and understandable page titles for each page. These titles...

Minimum Requirements:

  • Your website must include appropriate and understandable page titles for each page. These titles display at the top of the browser when users view your pages
  • Must have a minimum of three sub-pages excluding the homepage. Additional pages MUST be subpages linked off the homepage
    • Homepage: This page will include a brief introduction of the site, links to the other pages, pictures, etc.
      • Name the Homepage file ‘index.html’
    • About me page: this page tells about yourself and everything you want a prospective employer know about you.  
    • Other pages may include the followings:
      • Project page: This page should include an organized set of your past/current projects.  
      • Future goals page: This page should include an outline of what you want to achieve in the future.
      • Resume page; Create a resume for yourself and include that on this page.
  • Use HTML5 and CSS3 only (use of templates is not allowed)
  • Pages must be professionally related and well organized and each page should have a clear navigation bar (links to all the pages in the website)
  • All links must go to designated targets
  • Other things to consider:
    • Check your website for any misspellings or grammatical errors
    • Your website should be attractive, easy to navigate, and pages should fit together properly.
    • Check your website for accessibility. Your website must be accessible to hearing and visually impaired users. For example, use standard internet fonts and include alternate text for all images
    • Your code must be correct, well-structured, free from clutters, and easy to read
    • Use proper indentation and add comments where it helps with the readability of your code. If you copy codes from somewhere else, make sure you review and adjust it to your page. Avoid having any unnecessary lines of code that don’t do anything with your page.
    • Avoid using multiple styling formats
    • If information cannot be viewed due to a webpage error, it will be considered absent. Therefore, verify that the entire website works properly.

In: Computer Science

SQL ONLY. WRITE CLEAR AND SIMPLE ANSWERS. Consider the following relations (PRIMARY KEYS ARE WRITTEN IN...

SQL ONLY. WRITE CLEAR AND SIMPLE ANSWERS.

Consider the following relations (PRIMARY KEYS ARE WRITTEN IN BOLD) departments (dept_no, dept_name) dept_emp (emp_no, dept_no, from_date, to_date) dept_manager (dept_no, emp_no, from_date, to_date) employees (emp_no, birth_date, first_name, last_name, gender, hire_date) salaries (emp_no, salary, from_date, to_date) titles(emp_no, title, from_date, to_date) Write the following queries in SQL. No duplicates should be printed in any of the answers. List all the titles for which there is at least one employee having the title. Find the current employee(s) (only id) who has/have the most (highest) experience working in a department [across all departments]. Here, we are referring to working only in one department. For example, let's assume there are only two employees: A and B. Now, A has been working in department X for 15 years and B worked in department X for 10 years and is working in department Y for 8 years. Although B has worked for a total of 18 years, he worked for 10 years in one department. So, for this query the output should be the id of A because A has worked for 15 years in one department which is the highest. Find the names (both first and last) and current salary of all employees who were hired after 31st December 1998. (Hint: The to_date for current salary is '9999-01-01') Find the id and name (both first and last) of all employees who are currently not in the 'Development' department and whose first name start with 'Tom'. Find the names (both first and last) and current salaries of all employees who earn more than the current average salary of all employees. List them in the descending order based on their salary (highest salary first). Some employees have worked in multiple departments. Find the names (both first and last) and the number of departments of all the female employees who have worked in more than one department. Write SQL query to find out the name and current average salary of the department that has the maximum current average salary? Find the employee id of the current managers who currently manages more than 16000 employees. Find the name and current average salary of the departments whose current average salary is more than the current average salary of 'Development' department. Find the name of the employees who currently have the same salary but currently works in different department.

SQL ONLY. WRITE CLEAR AND SIMPLE ANSWERS. READ THE QUESTIONS CAREFULLY. IF AN ANSWER IS WRONG, I WILL DOWNVOTE.

In: Computer Science

Write C++ program (submit the .cpp,.h, .sln and .vcxproj files) Problem 1. Generate 100 random numbers...

Write C++ program (submit the .cpp,.h, .sln and .vcxproj files)

Problem 1. Generate 100 random numbers of the values 1-20 in an input.txt. Now create a binary search tree using the numbers of the sequence. The tree set should not have any nodes with same values and all repeated numbers of the random sequence must be stored in the node as a counter variable. For example, if there are five 20s’ in the random sequence then the tree node having data 20 has counter variable equal to 5. Sort the sequence of numbers including repeat numbers using Binary Tree traversal.

Problem 2. Build a binary tree using a binary tree class member function from the following array of preorder traversal 3,9,20,15,7 and inorder traversal 9,3,15,20,7. Implement the constructor, destructor and all member functions including print postorder traversal of the binary tree.

In: Computer Science

Explain and describe the concept of homogeneous matrix (projection) and how it is used in computer...

Explain and describe the concept of homogeneous matrix (projection) and how it is used in computer graphics

In: Computer Science

Scale-based classification for networks allows us to differentiate PANs, LANs, MANs, and WANs. Moreover, the structure...

Scale-based classification for networks allows us to differentiate PANs, LANs, MANs, and WANs. Moreover, the structure of a network is defined using various network topological organizations, which include bus, ring, star, mesh, tree, and hybrid networks. Using the above two concepts, establish the relation between the various types of networks (PANs, LANs, MANs, and WANs), with the most suited network topology (bus, ring, mesh, tree, and hybrid). For each of the network types (PANs, LANs, MANs, and WANs), you may specify one or more network topology. However, for each of the cases, justify and explain why and how the specific topology is appropriate for the given context. Note: You may use external resources and readings. Make sure that you include proper references to sources that you have used to write the report. Word limit: 200 - 300 words

In: Computer Science

2 Insert a function in cell B2 to display the current date from your system. 3...

2

Insert a function in cell B2 to display the current date from your system.

3

With cell B2 selected, set the width of column B to AutoFit.

4

Insert a VLOOKUP function in cell C5 to display the ring cost for the first student. The cost of the ring type should be an exact match. Use appropriate relative and absolute cell references.

5

Copy the formula from cell C5 to the range C6:C11.

6

Apply Accounting number format to the range C5:C11.

7

Insert an IF function in cell E5 to calculate the total due. If the student has chosen to personalize the ring, there is an additional charge of 5% located in cell B21 that must be added to the cost of the ring; if not, the student only pays the base price. Use appropriate relative and absolute cell references.

8

Copy the formula from cell E5 to the range E6:E11.

9

Apply Accounting number format to the range E5:E11.

10

Insert a function in cell G5 to calculate the first student's monthly payment, using appropriate relative and absolute cell references. Ensure the result is a positive number.

11

Copy the formula from cell G5 to the range G6:G11.

12

Apply Accounting number format to the range G5:G11.

13

Calculate totals in cells C12, E12, and G12.

14

Apply Accounting number format to the cells C12, E12, and G12.

15

Set 0.3" left and right margins and ensure the page prints on only one page.

16

Insert a footer with your name on the left side, the sheet name in the center, and the file name on the right side.

17

Save and close Exp19_Excel_Ch02_Cap_InlandJewelers.xlsx. Exit Excel. Submit the file as directed

In: Computer Science

For this question, normalize the table to 3NF and draw the relational schema showing cardinalities. UCLA...

For this question, normalize the table to 3NF and draw the relational schema showing cardinalities.

UCLA just purchased several servers that are to be used for enterprise resource planning (ERP). The individual servers were purchased from different suppliers and these servers are running different software applications. UCLA also trained several of its staff to use these servers and each trained staff has an authentication code that allows the staff to use a specific software application on a specific server for a specific time period. Software license is for specific servers and a server could have multiple software applications at a time. Every supplier assigns a tech person with ID to support UCLA in case of any challenges. Each tech person provides a mobile phone number to be used to reach him. Servers have a purchase price.

Attributes are: ServerNo, SupplierID, SupplierName, SupplierPhone, SupplierTechID, SupplierTechName, SupplierTechPhone, SoftwareApplicationID, SoftwareApplicationName, SoftwareApplicationVendor, SoftwareApplicationLicenseExpires, SoftwareApplicationLicensePrice, StaffID, StaffName, StaffAuthenticationStarts, StaffAuthenticationEnds, StaffAuthenticationCode, PurchasePrice

In: Computer Science

Using the template given in ParallelMergeSort.c write the functions to divide the original array into equal...

Using the template given in ParallelMergeSort.c write the functions to divide the original array into equal fractions given the number of threads and perform Parallel MergeSort pThreads. Your algorithm should work for 2 threads.

ParallelMergeSort.c

#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

#define SIZE 100

int array[SIZE];

void fillArrayWithRandomNumbers(int arr[SIZE]) {
for(int i = 0; i<SIZE; i++) array[i] = rand()%100;
}

void printArray(int arr[SIZE]) {
for(int i = 0; i<SIZE; i++) printf("%5d", arr[i]);
printf("\n");
}

typedef struct StartEndIndexes {
int start;
int end;
} StartEndIndexes;

// Runs mergesort on the array segment described in the
// argument. Spawns two threads to mergesort each half
// of the array segment, and then merges the results.
void* mergeSort(void* args) {
return NULL;
}

int main() {
srand(time(0));
StartEndIndexes sei;
sei.start = 0;
sei.end = SIZE - 1;
  
// 1. Fill array with random numbers.
fillArrayWithRandomNumbers(array);
  
// 2. Print the array.
printf("Unsorted array: ");
printArray(array);
  
// 3. Create a 2 threads for merge sort.
  
// 4. Wait for mergesort to finish.
  
// 5. Print the sorted array.
printf("Sorted array: ");
printArray(array);
}

Makefile

mergeSort: ParallelMergeSort.c
   gcc -std=c99 -pthread -o ParallelMergeSort ParallelMergeSort.c -I.

In: Computer Science