Questions
Role of Chief Information Officer (CIO) is assigned to you: Chief Information Officer (CIO): All IT...

Role of Chief Information Officer (CIO) is assigned to you: Chief Information Officer (CIO): All IT is overseen by the CIO. The CIO is over the hardware, software, IT processes, management, support and security and privacy of all systems within the organization To prepare for this Discussion, gather information from the library and research other web resources. Write a plan describing your role as a Chief information officer (CIO) in developing the system, your tasks based on your role, and your input to a plan for developing the system.

In: Computer Science

Why is documenting computer programs essential? Include in your discussion why you do or don't believe...

Why is documenting computer programs essential? Include in your discussion why you do or don't believe it regularly occurs? Provide at least one example.

In: Computer Science

6. Compound Interest When a bank account pays compound interest, it pays interest not only on...

6. Compound Interest
When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is:

? = ?(1 + ?)???

The terms in the formula are:
A is the amount of money in the account after the specified number of years.P is the principal amount that was originally deposited into the account.
r is the annual interest rate.
n is the number of times per year that the interest is compounded.
t is the specified number of years.

Write a program that makes the calculation for you. The program should ask the user to
input the following:
• The amount of money you want to make in the account after the specified number of years.
• The annual interest rate paid by the account as a decimal number.
• The number of times per year that the interest is compounded (For example, if interest
is compounded monthly, enter 12. If interest is compounded quarterly, enter 4.)
• The number of years the account will be left to earn interest
Once the input data has been entered, the program should calculate and display the principal amount you have to deposit into the account.

In: Computer Science

Write a program that receives an integer and must return a string containing the hexadecimal representation...

Write a program that receives an integer and must return a string containing the hexadecimal representation of that integer.

In: Computer Science

Use the pumping lemma to prove that the following languages are not regular. (a)L2 = {y...

Use the pumping lemma to prove that the following languages are not regular.

(a)L2 = {y = 10 × x | x and y are binary integers with no leading 0s, and y is two times x}. (The alphabet for this languages is {0, 1, ×, =}.) For example, 1010 = 10 × 101 is in L2, but 1010 = 10 × 1 is not.

(b)Let Σ2 = {[ 0 0 ] , [ 0 1 ] , [ 1 0 ] , [ 1 1 ]} . Consider each row to be a binary number and let L3 = w ∈ Σ ∗ 2 | the bottom row of w is the square of the top row of w . For example, [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 0 0 ] [ 0 0 ] ∈ L3, but [ 0 1 ] [ 0 0 ] [ 0 0 ] [ 1 0 ] [ 0 0 ] [ 0 0 ] ∈/ L3.

In: Computer Science

n this task, you'll be asked to create a simple for-loop to loop over a simple...

n this task, you'll be asked to create a simple for-loop to loop over a simple data construct, in this case, to provide the maximum, minimum, and average length of words in a speech performing a lexicographical analysis not unlike what's used to measure reading level.

Specifications

  1. Keep working on the same notebook
  2. Create a function named lexicographics() that takes one parameter:
    1. to_analyze, a required string
  3. Using a single for loop, calculate the following for your text:
    1. The maximum number of words per line in to_analyze (eg, the length of the longest line in to_analyze)
    2. The minimum number of words per line in to_analyze (eg, the length of the shortest line in to_analyze)
    3. The average number of words per line in to_analyze, stored as a decimal.
  4. Return these values as a tuple, in the order in which they are defined above.

In: Computer Science

USING SQL Create a table named Zones with the attributes and assumptions indicated below. Attributes: the...

USING SQL

Create a table named Zones with the attributes and assumptions indicated below.

  • Attributes: the zone ID, the lowest and the highest accepted temperature.

Assumptions: the ID will be the primary key and have one or two digits, the temperatures (in Fahrenheit) will be at most two digits and a possible minus sign, none of the temperatures can be NULL.

Populate table Zones so that it has the following rows:

id lowerTemp higherTemp
2 -50 -40
3 -40 -30
4 -30 -20
5 -20 -10
6 -10 0
7 0 10
8 10 20
9 20 30
10 30 40

3. Deliveries

The same flower vendor wants to use a code to explain the type of delivery for each flower. Create a table named Deliveries with the attributes and assumptions indicated below.

  • Attributes: the delivery ID, the category or type of delivery, and the size of the delivery.

  • Assumptions: the ID will be the primary key and have one one digit, the category will be at most five characters (pot, plant, hedge, shrub, tree), and the delivery size will be up to five digits with three decimal spaces (possibly NULL).

Populate table Deliveries so that it has the following rows:

id categ delSize
1 pot 1.500
2 pot 2.250
3 pot 2.625
4 pot 4.250
5 plant NULL
6 bulb NULL
7 hedge 18.000
8 shrub 24.000
9 tree 36.000

3. FlowersInfo

Create a table named FlowersInfo with the attributes and assumptions indicated below. Choose the most appropriate data types.

Attributes: an ID with three characters, common name, Latin name, the coolest and hottest zones where it can be grown, the delivery category, and the sun needs.

Assumptions: The ID will be the primary key, the attribute common name may have up to thirty characters, and the Latin name up to thirty-five characters. The attributes coolest zone, hottest zone, and delivery category will match the IDs from other tables, and the sun needs will be up to five characters, S for Sun, SH for Shade, P for Partial sun and any combination (StoP, StoSH, etc.). Your table definition should implement referential integrity whenever possible.
Populate table FlowersInfo so that it has the following rows:

id conName latName cZone hZone deliver sunNeeds
101 Lady Fern Atbyrium filix-femina 2 9 5 SH
102 Pink Caladiums C.x bortulanum 10 10 6 PtoSH
103 Lily-of-the-Valley Convallaria majalis 2 8 5 PtoSH
105 Purple Liatris Liatris spicata 3 9 6 StoP
106 Black Eyed Susan Rudbeckia fulgida var. specios 4 10 2 StoP
107 Nikko Blue Hydrangea Hydrangea macrophylla 5 9 4 StoSH
108 Variegated Weigela W. florida Variegata 4 9 8 StoP
110 Lombardy Poplar Populus nigra Italica 3 9 9 S
111 Purple Leaf Plum Hedge Prunus x cistena 2 8 7 S
114 Thorndale Ivy Hedera belix Thorndale 3 9 1 StoSH

4. Queries

Write SQL statements to answer the following queries. Write a comment header right before each SQL statement with the letter of the query answered by the statement.

a) the total number of zones.

b) the number of flowers per cool zone.

c) common names of the plants that have delivery sizes less than 5.

d) common names of the plants that require full sun (i.e., sun needs contains ‘S’).

e) all delivery category names order alphabetically (without repetition).

f) the exact output (note that it is order by Name):

In: Computer Science

draw a uml diagram for a class

draw a uml diagram for a class

In: Computer Science

Java Data Structure Doubly Linked List /* * Complete the swap(int index) method * No other...

Java Data Structure Doubly Linked List

/*
* Complete the swap(int index) method
* No other methods/variables should be added/modified
*/
public class A3DoubleLL<E> {
   /*
   * Grading:
   * Swapped nodes without modifying values - 2pt
   * Works for all special cases - 1pt
   */
   public void swap(int index) {
       //swap the nodes at index and index+1
       //change the next/prev connections, do not modify the values
       //do not use delete/remove/insert/add to help with this process
       //make sure to account for all special cases
   }

   private Node start, end;
   private int count;
   public A3DoubleLL() {
       start = end = null;
       count = 0;
   }
   public String printList() {
       String output = "";
       Node current = start;
       while(current != null) {
           output += current.value + ",";
           current = current.next;
       }
       return output;
   }
   public String printListRev() {
       String output = "";
       Node current = end;
       while(current != null) {
           output += current.value + ",";
           current = current.prev;
       }
       return output;
   }
   public void add(E val) {
       Node newItem = new Node(val);
       if(start == null) {
           start = newItem;
           end = start;
           count = 1;
       } else {
           end.next = newItem;
           newItem.prev = end;
           end = newItem;
           count++;
       }
   }
   public void insert(E val, int index) {
       if(index < 0) {//fix invalid index
           index = 0;
       }
       if(index >= count) {//goes in last position
           this.add(val);
       } else {
           Node newItem = new Node(val);
           if(index == 0) {//goes in first position
               newItem.next = start;
               start.prev = newItem;
               start = newItem;
           } else {//goes in middle
               Node current = start;
               for(int i = 1; i < index; i++) {
                   current = current.next;
               }
               newItem.next = current.next;
               newItem.prev = current;
               current.next.prev = newItem;
               current.next = newItem;
           }
           count++;
       }
   }
   public void delete(int index) {
       if(index >= 0 && index < count) {//valid index
           if(index == 0) {//remove first
               start = start.next;
               if(start != null) {//as long as there was an item next in list
                   start.prev = null;
               } else {//if only item was removed
                   end = null;
               }
           } else if(index == count-1) {//remove last item
               end = end.prev;
               end.next = null;
           } else {//remove middle item
               Node current = start;
               for(int i = 1; i < index; i++) {
                   current = current.next;
               }
               current.next = current.next.next;
               current.next.prev = current;
           }
           count--;
       }
   }
   public E get(int index) {
       if(index >= 0 && index < count) {//valid index
           Node current = start;
           for(int i = 0; i < index; i++) {
               current = current.next;
           }
           return current.value;
       }
       return null;
   }
   public String toString() {
       return this.printList();
   }
   private class Node {
       E value;
       Node next, prev;
       public Node(E v) {
           value = v;
           next = prev = null;
       }
   }
}

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


public class A3Driver {
  
   public static void main(String[] args) {
      
       A3DoubleLL<Integer> list = new A3DoubleLL<>();
       for(int i = 1; i < 10; i++) {
           list.add(i);
       }
       System.out.println("Before Swap");
       System.out.println(list.printList());
       System.out.println(list.printListRev());
       list.swap(4);
       System.out.println("After Swap");
       System.out.println(list.printList() + ":1,2,3,4,6,5,7,8,9,");
       System.out.println(list.printListRev() + ":9,8,7,6,5,4,3,2,1,");
       System.out.println();
      
       System.out.println("Hot Potatoe");
       A3CircleLL hotPotato = new A3CircleLL();
       hotPotato.playGame(5, 3);
       System.out.println("Correct:");
       System.out.println("Removed Player 4\nRemoved Player 3\nRemoved Player 5\nRemoved Player 2\nWinning player is 1");
       System.out.println();
      
       A3Queue<Integer> queue = new A3Queue<>();
       queue.enqueue(5);
       queue.enqueue(20);
       queue.enqueue(15);
       System.out.println(queue.peek()+":5");
       System.out.println(queue.dequeue()+":5");
       queue.enqueue(25);
       System.out.println(queue.dequeue()+":20");
       System.out.println(queue.dequeue()+":15");

   }
}

In: Computer Science

Using Python. In this question, you are expected to use TensorFlow and Keras to perform a...

Using Python.

In this question, you are expected to use TensorFlow and Keras to perform a deep learning process for creating an image classifier to distinguish between dog and cat. You should follow fchollet’s code to create the classifier and test this classifier with one test photo of dog and one test photo cat. Create a screenshot to show the classifying results of these two test photos. The dog and cat in the test photos should not be in your original training dataset, and you may use your own pets or your neighbor’s pets.

Thankyou

use this website for reference:

https://keras.io/examples/vision/image_classification_from_scratch/

In: Computer Science

Question about Java ArrayList: how to delet congestive number: eg : [1 2 2 3 2...

Question about Java ArrayList:

how to delet congestive number:

eg : [1 2 2 3 2 2 1] -----> [1 2 3 2 1]

how to get the number that only in one list:

eg:

[2 2 1], [ 4 4 2 2], [8 8 4 4 2] -------->[1,8]

[8 8 4 4 2], [4 4 2 2], [2 2 1] --------->[1,8]

Thanks in advance

In: Computer Science

Java. Complete the methods for infixToPostfix, postfixToInfix, solvePostfix. import java.util.Stack; public class B1Work {    /*...

Java. Complete the methods for infixToPostfix, postfixToInfix, solvePostfix.

import java.util.Stack;

public class B1Work {
   /*
   * Grading:
   * Correctly converts infix to postfix - 3pts
   */
   public static String infixToPostfix(String infix) {
       /*
       * Convert an infix math formula to postfix format
       * Infix format will always include parens around any two values and a symbol
       * You will not need to imply any PEMDAS rules besides parens
       * EXAMPLES:
       * infix: (1+2) postfix: 12+
       * infix: (1+(2-3)) postfix: 123-+
       * infix: ((1+2)-3) postfix: 12+3-
       * infix: ((1+2)-(3*4)) postfix: 12+34*-
       */
       return null;
   }
   /*
   * Grading:
   * Correctly converts postfix to infix - 2pts
   */
   public static String postfixToInfix(String postfix) {
       /*
       * Convert a postfix math formula to an infix format
       * See above for conversion examples
       * Make sure to include parens in the infix format
       */
       return null;
   }
   /*
   * Grading:
   * Correctly solves postfix formulas with +-/* - 1pt
   */
   public static double solvePostfix(String postfix) {
       Stack<Integer> stack = new Stack<>();
       /*
       * Use a Stack to help solve a postfix format formula for the numeric answer
       * Order of operations is implied by where symbols/numbers exist
       * EXAMPLES
       * postfix: 12+ = 3
       * postfix: 123-+ = 0 :: 2-3 = -1 :: 1 + (-1) = 0
       */
       return 0;
   }
}

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

import java.util.Scanner;

public class B1Driver {

   public static void main(String[] args) {
       Scanner s = new Scanner(System.in);
       String format = "";
       do {
           System.out.print("What format will your formula be in (infix/postfix):");
           format = s.nextLine().toLowerCase();
       }while(!(format.equals("infix") || format.equals("postfix")));
       System.out.print("Enter your formula:");
       String formula = s.nextLine().replaceAll(" ", "");//removes whitespace
       String infix, postfix;
       switch(format) {
       case "infix":
           infix = formula;
           postfix = B1Work.infixToPostfix(infix);
           System.out.println("Infix:"+infix);
           System.out.println("Postfix:"+postfix);
           System.out.println("Answer:"+B1Work.solvePostfix(postfix));
           break;
       case "postfix":
           postfix = formula;
           infix = B1Work.postfixToInfix(postfix);
           System.out.println("Infix:"+infix);
           System.out.println("Postfix:"+postfix);
           System.out.println("Answer:"+B1Work.solvePostfix(postfix));
           break;
       }
   }

}

In: Computer Science

Java queue linked list /* * Complete the enqueue(E val) method * Complete the dequeue() method...

Java queue linked list

/*
* Complete the enqueue(E val) method
* Complete the dequeue() method
* Complete the peek() method
* No other methods/variables should be added/modified
*/
public class A3Queue {
   /*
   * Grading:
   * Correctly adds an item to the queue - 1pt
   */
   public void enqueue(E val) {
       /*
       * Add a node to the list
       */
   }
   /*
   * Grading:
   * Correctly removes an item from the queue - 1pt
   * Handles special cases - 0.5pt
   */
   public E dequeue() {
       /*
       * Remove a node from the list and return it
       */
       return null;
   }
   /*
   * Grading:
   * Correctly shows an item from the queue - 1pt
   * Handles special cases - 0.5pt
   */
   public E peek() {
       /*
       * Show a node from the list
       */
       return null;
   }
  
   private Node front, end;
   private int length;
   public A3Queue() {
       front = end = null;
       length = 0;
   }
   private class Node {
       E value;
       Node next, prev;
       public Node(E v) {
           value = v;
           next = prev = null;
       }
   }
}

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


public class A3Driver {
  
   public static void main(String[] args) {
      
  
       A3Queue queue = new A3Queue<>();
       queue.enqueue(5);
       queue.enqueue(20);
       queue.enqueue(15);
       System.out.println(queue.peek()+":5");
       System.out.println(queue.dequeue()+":5");
       queue.enqueue(25);
       System.out.println(queue.dequeue()+":20");
       System.out.println(queue.dequeue()+":15");

   }
}

In: Computer Science

Indexing Arrays & Scalar Operations Create a new array called “myShortArray” that contains the 1st, 3rd,...

Indexing Arrays & Scalar Operations

Create a new array called “myShortArray” that contains the 1st, 3rd, and 5th elements of the array “myArray” as defined below using the indexing method.

     myArray = [1, 2, 3, 4, 5, 6];

In: Computer Science

Insert the following data into an AVL tree and show the steps 10, 20, 30, 25,...

Insert the following data into an AVL tree and show the steps 10, 20, 30, 25, 40, 50, 35, 33, 37, 60, 38.

In: Computer Science