Questions
a) Write down the attributes of three computer hardware input devices. Discuss the form of interaction...

a) Write down the attributes of three computer hardware input devices. Discuss
the form of interaction each supports in a computer system.


b) With your knowledge in variations in physical abilities and physical workplaces,
what four practical guidelines would you adapt in your workplace? Explain the
reasons for your choice.

c) Explain the main concerns of Human Computer Interaction

In: Computer Science

Some information about youTube. Summarize to an Infographic. Focus on numbers, statistics, success stories, advantages, benefits,...

Some information about youTube.

Summarize to an Infographic. Focus on numbers, statistics, success stories, advantages, benefits, etc for youTube.

In: Computer Science

The charging min value is zero and max value is 100. When the charger is not...

The charging min value is zero and max value is 100. When the charger is not plugged, the robot is in discharging state and the battery decreases. When charger is attached, the state is changed to charging and the value increase. Once it reaches the max
limit, the state changes to battery full.

Q) Write boundary value analysis for battery level.

Q) Write test cases for battery level for both valid and invalid.

In: Computer Science

1. Servlet program to find the information about an account holder at a bank. ( Bank...

1. Servlet program to find the information about an account holder at a bank.
( Bank name= your name )
(I'm using netbeans with glassfish, lecturer mentioned not to use jsp, mostly use CSS, Javascript, html, xml)
• Case:
a) Have username and password authentication
b) Display his Account balance to be RM10000,
c) Show different functionalities of a bank account (Deposit, Withdrawal, Print)
d) For every transaction make sure make use of his account balance.
e) Perform the functionalities(Deposit, Withdraw and print) until the user selects
to stop.

In: Computer Science

– Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot...

– Consider an XYZ Hypermarket in the Sultanate of Oman. The hypermarket has got a lot of branches spread across different Wilayats in the country. As a database administrator, which client server architecture will you be preferring for this hypermarket and why. Support you answer with valid in-text citations and references.

In: Computer Science

In order to implement a DNS amplification attack, the attacker must trigger the creation of a...

  1. In order to implement a DNS amplification attack, the attacker must trigger the creation of a sufficiently large volume of DNS response packets from the intermediary to exceed the capacity of the link to the target organization. Consider an attack where the DNS response packets are 1000 bytes in size (ignoring framing overhead).

    1. How many of these packets per second must the attacker trigger to flood a target organization using a 30-Mbps link? A 100-Mbps link? Or a 1-Gbps link?

    2. If the DNS request packet to the intermediary is 60 bytes in size, how much bandwidth does the attacker consume to send the necessary rate of DNS request packets for each of these three cases?

In: Computer Science

Q17. Fill in the blanks: Consider the operands to be signed words (16 bit) a) mov...

Q17. Fill in the blanks:

Consider the operands to be signed words (16 bit)

a) mov ax, - 48 cwd mov bx , 5 idiv bx ; ax = _______ , dx = _____ (provide answers in decimal) Consider the operands to be signed words (16 bit)

b) mov ax , -1 mov bx , -1 imul bx ; ax = _________H, dx =__________H (provide answer in Hex) Consider the operands to be signed words

c) mov ax , -1 mov dx , 2 imul dx ; ax = _______H ,dx = ________H(provide answer in Hex) Consider the operands to be signed byte (8 bit)

d) mov al, -48 cbw mov bl, 5 idiv bl ; al = _____, ah = _______ (provide answers in decimal) 5

Q18. Fill in the values as the following code fragment is executed:

a) count DB 9A H ; count is Byte variable initialized to 9A H num DB BC H ; num is a Byte variable initialized to BCH mov ah, count mov al, num ; ax = _______________H

b) mov ax, 1234H mov ax, ‘A’ ; ax = ________________H (Hint: ASCII code of ‘A’ = 65 in decimal)

c ) mov dx , 0087H mov ax, 6000H mov bx, 100H div bx ; ax = ________________H

d) mov ax, 1237H sub al, 38H ; ax = ________________H

In: Computer Science

Provide an example of a real-time application and, to the best of your knowledge, discuss its...

Provide an example of a real-time application and, to the best of your knowledge, discuss its following aspects:

What would be the involved periodic tasks? What would be their release time (or release-time jitter)?

What would be the aperiodic tasks in the application? What would be their release time, i.e., events that would trigger the aperiodic tasks?

What would be the sporadic tasks in the application?

What would be their release time, i.e., events that would trigger the aperiodic tasks?

In: Computer Science

There's an array named score, 90, 98, 92, 88, 100, 80 are the elements in this...

There's an array named score, 90, 98, 92, 88, 100, 80 are the elements in this array.

Please write a Java program to declare and sort this array (use selection sort).

In: Computer Science

I need the java code for a 4 function calculator app on android studio (do this...

I need the java code for a 4 function calculator app on android studio (do this on android studio) -

The requirements are the following :

- The only buttons needed are 0-9, *, /, +, -, a clear, and enter button

- Implement the onclicklistener on the main activity

- The calcuator should use order of operations (PEMDAS)

- It should be able to continue from a previous answer (Ex: If you type 2+6 the calculator will display 8. If you then multiple by 2 the current result will simply be multiplied by 2)

- It should read the entire sequence of numbers and operators and save them into a String. The information can be read out of the String using a StringTokenizer. The delimiters will be the operators on the calculator.

- The entire mathematical expression will be displayed on the screen before the equal button is clicked.

- The equation will simply be evaluated in the order that the user types in the numbers rather than the precedence

- If the user enters an equation with invalid syntax, the output should display “error”. The calculator should also display “error” for any mathematical calculations that are impossible.

In: Computer Science

1 import java.util.Random; 2 3 /* This class ecapsulates the state and logic required to play...

1 import java.util.Random;
2
3 /* This class ecapsulates the state and logic required to play the
4 Stick, Water, Fire game. The game is played between a user and the computer.
5 A user enters their choice, either S for stick, F for fire, W for water, and
6 the computer generates one of these choices at random- all equally likely.
7 The two choices are evaluated according to the rules of the game and the winner
8 is declared.
9
10 Rules of the game:
11 S beats W
12 W beats F
13 F beats S
14 no winner on a tie.
15
16 Each round is executed by the playRound method. In addition to generating the computer
17 choice and evaluating the two choices, this class also keeps track of the user and computer
18 scores, the number of wins, and the total number of rounds that have been played. In the case
19 of a tie, neither score is updated, but the number of rounds is incremented.
20
21 NOTE: Do not modify any of the code that is provided in the starter project. Additional instance variables and methods
22 are not required to make the program work correctly, but you may add them if you wish as long as
23 you fulfill the project requirements.
24
25 */
26 public class StickWaterFireGame {
27
28
29 // TODO 1: Declare private instance variables here:
30
31
32 /* This constructor assigns the member Random variable, rand, to
33 * a new, unseeded Random object.
34 * It also initializes the instance variables to their default values:
35 * rounds, player and computer scores will be 0, the playerWins and isTie
36 * variables should be set to false.
37 */
38 public StickWaterFireGame() {
39 // TODO 2: Implement this method.
40
41 }
42
43 /* This constructor assigns the member Random variable, rand, to
44 * a new Random object using the seed passed in.
45 * It also initializes the instance variables to their default values:
46 * rounds, player and computer scores will be 0, the playerWins and isTie
47 * variables should be set to false.
48 */
49 public StickWaterFireGame(int seed) {
50 // TODO 3: Implement this method.
51
52 }
53
54 /* This method returns true if the inputStr passed in is
55 * either "S", "W", or "F", false otherwise.
56 * Note that the input can be upper or lower case.
57 */
58 public boolean isValidInput(String inputStr) {
59 // TODO 4: Implement this method.
60 return false;
61 }
62
63 /* This method carries out a single round of play of the SWF game.
64 * It calls the isValidInput method and the getRandomChoice method.
65 * It implements the rules of the game and updates the instance variables
66 * according to those rules.
67 */
68 public void playRound(String playerChoice) {
69 // TODO 12: Implement this method.
70 }
71
72 // Returns the choice of the computer for the most recent round of play
73 public String getComputerChoice(){
74 // TODO 5: Implement this method.
75 return null;
76 }
77
78 // Returns true if the player has won the last round, false otherwise.
79 public boolean playerWins(){
80 // TODO 6: Implement this method.
81 return false;
82 }
83
84 // Returns the player's cumulative score.
85 public int getPlayerScore(){
86 // TODO 7: Implement this method.
87 return 0;
88 }
89
90 // Returns the computer's cumulative score.
91 public int getComputerScore(){
92 // TODO 8: Implement this method.
93 return 0;
94 }
95
96 // Returns the total nuber of rounds played.
97 public int getNumRounds(){
98 // TODO 9: Implement this method.
99 return 0;
100 }
101
102 // Returns true if the player and computer have the same score on the last round, false otherwise.
103 public boolean isTie(){
104 // TODO 10: Implement this method.
105 return false;
106 }
107
108 /* This "helper" method uses the instance variable of Random to generate an integer
109 * which it then maps to a String: "S", "W", "F", which is returned.
110 * This method is called by the playRound method.
111 */
112 private String getRandomChoice() {
113 // TODO 11: Implement this method.
114 return null;
115 }
116 }
117

In: Computer Science

Record a macro that sets Cell B5 to a format of Bold and sets the Number...

Record a macro that sets Cell B5 to a format of Bold and sets the Number format to be in $.  Copy the VBA code for that macro and paste it.

In: Computer Science

Use C++ language Ask the user for their favorite number. If it isn't 10 and isn't...

Use C++ language

  1. Ask the user for their favorite number. If it isn't 10 and isn't divisible by 3, tell them they made a good choice.
  2. Ask the user how many guests will be arriving, use a while loop to ensure they don't give you negative number of guests. Ask them the name of each guest and output "hello guest" with their name.

3. Ask the user to pick a number between 1 and 100. You (the program) should try and guess the number the user picked. The user can tell you if their number is higher or lower, but that is all. The program should run until the computer guesses correctly.

In: Computer Science

what is the concept of bottleneck link?

what is the concept of bottleneck link?

In: Computer Science

Java iteration method, I need a method which iterates through a collection of books and adjusts...

Java iteration method, I need a method which iterates through a collection of books and adjusts the price of all books published between the given parameters to give a 20% discount off the price of each book published between the given years?

Book class

public class Book
{

    private String title;
    private String author;
    private int yearPublished;
    private double bookPriceInCAD;


    public Book(String inputTitle, String inputAuthor, int inputYearPublished, double inputBookPriceInCAD){
     setTitle(inputTitle);
     setAuthor(inputAuthor);
     setYearPublished(inputYearPublished);
     setBookPriceInCAD(inputBookPriceInCAD);
    }

    public String getTitle(){
        return title;
    }

    public String getAuthor(){
        return author;
    }

    public int getYearPublished(){
        return yearPublished;
    }

    public double getBookPriceInCAD(){
        return bookPriceInCAD;
    }

    public void setTitle(String title){
        if(title !=null && !title.isEmpty()){
            this.title = title;
        } else if(title == null){
            throw new IllegalArgumentException("title cannot be null");
        } else if(title.isEmpty()){
            throw new IllegalArgumentException("title cannot be an empty String");
        }
     }

     public void setAuthor(String author){
        if(author !=null && !author.isEmpty()){
            this.author = author;
        } else if(author == null){
            throw new IllegalArgumentException("author cannot be null");
        } else if(author.isEmpty()){
            throw new IllegalArgumentException("author cannot be an empty String");
        }
    }

    public void setYearPublished(int yearPublished){
        if(yearPublished > 0){
            this.yearPublished = yearPublished;
        } else {
            throw new IllegalArgumentException("year published cannot be negative");
        }
      }

    public void setBookPriceInCAD(double bookPriceInCAD){
        if(bookPriceInCAD > 0){
            this.bookPriceInCAD = bookPriceInCAD;
        } else {
            throw new IllegalArgumentException("book price in CAD cannot be negative");
        }
    }

BookStore Class

import java.util.ArrayList;
import java.util.Iterator;
public class BookStore
{
  

    private ArrayList<Book> bookList;
    private String businessName;
  

    public BookStore()
    {
        // initialise instance variables
        bookList = new ArrayList<Book>();
        businessName = "Book Store";
      
    }

    public BookStore(String inputBusinessName){
        setBusinessName(inputBusinessName);
        bookList = new ArrayList<Book>();
     }


    public void setBusinessName(String businessName){
        if(businessName !=null && !businessName.isEmpty()){
            this.businessName = businessName;
        } else if(businessName == null){
            throw new IllegalArgumentException("business Name cannot be null");
        } else if(businessName.isEmpty()){
            throw new IllegalArgumentException("business Name cannot be an empty String");
        }
     }

    public String getBusinessName(){
        return businessName;
    }

    public ArrayList<Book> getBookList(){
        return bookList;
    }

    public void addBook(Book book){
      if(book!=null){
          bookList.add(book);
    }
    }

    public void getBook(int index) {
    if((index >= 0) && (index <= bookList.size())) {
        Book oneBook = bookList.get(index);              
        oneBook.displayDetails();
    }
    else{
        System.out.println("Invalid index position");
    }
    }

    public void searchBook(String title){
        for(Book b: bookList){
         String bookTitle = b.getTitle();
        if(bookTitle.equalsIgnoreCase(title)){
            b.displayDetails();
        } else{
            System.out.println("book not found");
    }
    }
    }

    public void displayBookDetails(){
        for(Book oneBook: bookList){
            oneBook.displayDetails();
          
      }
    }
  

    public static void main(String[] args){
        BookStore list = new BookStore();
        Book b1 = new Book("hello world","steven segal",2005,20.00);
        Book b2 = new Book("goodbye world","Jeff country", 208,10.00);
        Book b3 = new Book("no world","Bill Nye",202,30.00);
        list.addBook(b1);
        list.addBook(b2);
        list.addBook(b3);
        list.getBook(4);
        list.getBook(2);

        list.displayBookDetails();
    }
  
       public int donateBook(int yearPublished){
        Iterator<Book> iter = bookList.iterator();
        int count = 0;
        while(iter.hasNext()){
            Book aBook = iter.next();
          
            if(yearPublished <= aBook.getYearPublished()){
                iter.remove();
                count++;
            }
        }
        return count;
    }
    public void applyDiscountToBook(int beginYear, int endYear){
    }
   

In: Computer Science