Questions
Project on a double pendulum using MATLAB. I have simulated double pendulum chaos using the code...

Project on a double pendulum using MATLAB. I have simulated double pendulum chaos using the code I found in Chegg. Could you please guide in adding a code to determine the time it takes for the second arm of the pendulum to "flip" based on initial starting conditions?

In: Computer Science

List at least six reasons of why mobile apps are essential and preferable than traditional websites...

List at least six reasons of why mobile apps are essential and preferable than traditional websites for everyday business

In: Computer Science

Do the following: • Download Wireshark. • Start Wireshark. • Turn on Wireshark capture. • Type...

Do the following: • Download Wireshark. • Start Wireshark. • Turn on Wireshark capture. • Type a URL in your browser window (not Wikipedia.org). • After a few seconds, stop the capture. • Answer the following questions: 1a. What URL did you use? What was the IP address of the webserver?

1b. Find the frame in which your PC sent the SYN packet. List the source and destination IP address, the source and destination port numbers, and the header checksum.

1c. Select the SYN/ACK packet. List the source and destination IP address, the source and destination port numbers, and the header checksum.

1d. Select the packet that acknowledges the SYN/ACK segment. List the source and destination IP address, the source and destination port numbers, and the header checksum. 2. Change the options so that only packets you send are recorded. Do a capture. Click on the window containing Wireshark and hit Alt-Enter. This captures the window to your clipboard. Paste it into your homework.

In: Computer Science

In Unity with C#, I need to implement a dice simulator in my character generator(D&D). I...

In Unity with C#, I need to implement a dice simulator in my character generator(D&D). I have 6 sides of UI images(2D). With my code, I am able to roll and get the number in my console text(randomly).

But, I need help for rolling 5 dices, not the 1 dice. Also, I need to add all the three highest rolls with 5 dices and get a result in my display.

Ex) 1. Players must roll 5d6 and add the three highest rolls to compute each of the six Abilities. Note make all modifiers default to +2.

In: Computer Science

Must be in C++ and we can not use STR[] we must use STR.at() Write a...

Must be in C++ and we can not use STR[] we must use STR.at()

Write a program that:

  1. Declares a variable suitable for holding a person’s name
  2. Prompts the user to enter a person’s name with the text Enter name:
  3. Reads the user's input and stores it in the variable created in step 1
  4. Outputs the following information about the name they entered
    a. The index of the last character in the name
    b. The last 3 characters of the first name
    c. The first 3 characters of the last name
    Your output should look like the examples below. **Note: Your code should account for the fact that the user might enter a middle name or initial.

Example 1:

Enter name: Grace Hopper
Index of last character: 11
Last 3 characters of first name: ace
First 3 characters of last name: Hop

Example 2:

Enter name: Dorothy J. Vaughan
Index of last character: 17
Last 3 characters of first name: thy
First 3 characters of last name: Vau

This is my code:

#include <iostream>
#include <string>
using namespace std;

int main()
{
   string userFirstname;
   string userLastname;
   string userMiddlename;

   cout << "Enter Name: ";
   cin >> userFirstname;
   cin >> userMiddlename;
   cin >> userLastname;
   cout << userFirstname << userMiddlename << userLastname << endl;

   cout << "Index of last character: ";
   cout << ((userFirstname.size() + userLastname.size()) - 1);
   cout << endl;

   cout << "Last 3 characters of first name: ";
   cout << (userFirstname.at(userFirstname.size() - 3)) << (userFirstname.at(userFirstname.size() - 2)) << (userFirstname.at(userFirstname.size() - 1)) << endl;

   cout << "First 3 characters of last name: ";
   cout << userLastname.at(1) << userLastname.at(2) << userLastname.at(3) << endl;

   return 0;
}

In: Computer Science

Create a Java to find the GCD of two numbers. You will need to create a...

Create a Java to find the GCD of two numbers. You will need to create a new variable to reflect the algorithm (numberOne, numberTwo, GCD = 0).

Requirements:

1) read in numberOne

2) read in numberTwo.

3) run the loop, If numberTwo is 0 then print out numberOne, otherwise, temp =numberOne % numberTwo, numberOne = numberTwo, numberTwo = temp.

In: Computer Science

**Add comments to ARM code to explain steps** Write an ARM assembly program to convert temperatures...

**Add comments to ARM code to explain steps**

Write an ARM assembly program to convert temperatures from Celsius to Fahrenheit or from Fahrenheit to Celsius. Here are the two formulas for your reference. Use variable to read and store values.

C= 5* (F - 32) / 9

F = (9 * C / 5 ) + 32

TempConvert.s

LDR R8,=temperature

LDR R1,[R8]

LDR R8,=unit

LDRB R2,[R8]

LDR R8,=celsius

LDRB R3,[R8]

LDR R8,=fahrenheit

LDRB R4,[R8]

MOV R6,#9

MOV R7,#5

;----C = 5 * (F - 32) / 9

SUB R5,R1,#32

MUL R5,R5,R7

UDIV R5,R5,R6

;------F = (9 * C / 5) + 32

MUL R5,R1,R6

UDIV R5,R5,R7

ADD R5,R5,#32

stop B stop

temperature DCD 50

unit DCB "F",0

celsius DCB "C",0

fahrenheit DCB "F",0

END

In: Computer Science

Give an example of inheritance, you must have a parent and child and test program with...

Give an example of inheritance, you must have a parent and child and test program with at least one variable in each and setters and getters and constructors. The test program must test all the methods.

In: Computer Science

Introduction Introduction to Data Structures programming assignments can be completed either in C++ (preferred) or in...

Introduction

Introduction to Data Structures programming assignments can be completed either in C++ (preferred) or in Java. In both cases you cannot use libraries or packages that contain pre-built data structures, other than built-in support for objects, arrays, references, and pointers.

Classes in C++ and Java can represent anything in the real world. This assignment is to write a compiler for Z++ programming language.

The Z++ Programming Language

Your program will test if an expression entered by the application user is valid under the Z++ programming language. Therefore, you need to know a little bit about the Z++ programming language (which of course doesn't really exist, not yet anyway).

The Z++ programming language uses only 6 characters, left and right brackets, parentheses and curly braces: { [ ( } ] ). A left curly brace, bracket or parentheses is referred to as a left character. A right curly brace, bracket or parentheses is referred to as a right character.

A Z++ expression is valid if each left character in the expression "matches" with a corresponding right character in the expression. The test for a match requires going left to right through an expression, character by character. When a right character is encountered, then it is compared to the rightmost left character that was not previously compared to a right character. If the characters match, such as { and }, [and ], or ( and ), then you continue through the expression, comparing each right character to the rightmost left character that was not previously compared to a right character, until either the left and right characters don't match (which means the expression is not valid) or there are no more right characters. When there are no more right characters, if all of the left characters have previously been compared to a right character, the expression is valid. However, if there still are left characters that have not previously been compared to a right character, the expression is invalid.

Let's look at some examples. The following expressions are valid:

[]{}()

{([])}

()[{}]

[{}()]

Note that the matching may be by the right character immediately following the left character, by nesting, or by a combination of the two.

However, the expression [({})) is not valid as [ does not correspond to ). Additionally, the expression ([{}()] is not valid. Even though each right character is matched by a left character, the first left character is left over after you have run out of right characters.

Program Description

Your program, which will be written in C++, not Z++, will prompt the user to enter a string of not more than 20 characters. You may use a character array, a C-string or the C++ string class; the choice is up to you. You can assume the user enters no more than 20 characters (though the user may enter less than 20 characters) and the characters entered are limited to left and right brackets, parentheses and curly braces; you do not need to do any error-checking on this. After the user ends input, by the Enter key, the program checks if the string is a valid Z++ expression, and reports that it either is or isn't. Sample outputs:

Enter an expression: []{}()

It's a valid expression

Enter an expression: ()[{}]

It's a valid expression

Enter an expression: [({)}]

It's NOT a valid expression

Stack Class

Module #3 (http://www.agazaryan.com/csit836/stack.html), which accompanies this assignment, explains a stack and how it will be represented by a class having the member variables and member functions (including a constructor) appropriate for a stack.

Multiple Files

The class will be written using header and implementation files. Your program also will include a driver file, so your multi-file project will have three files:

File Name Purpose
cstack.h Header file for stack
cstack.cpp Implementation file for stack
test.cpp Driver file

Module #3 (http://www.agazaryan.com/csit836/stack.html) gives you the test.cpp file and all the information necessary to write the cstack.h file. Your job is to write the cstack.cpp file. All class members (variables and functions) must be private unless they need to be public.

In: Computer Science

For each of the three organizations below, Recommend whether the organization should build or buy/outsource the...

For each of the three organizations below,

  • Recommend whether the organization should build or buy/outsource the system in question. Explain your answer.
  • What additional information would be useful in making your recommendation?

Organizations:

  1. A medium-sized company that sells roofing materials to contractors needs a system that will allow customers to check product inventory through a website.
  2. A large (Fortune 500) retailer with a large, well-skilled IT department needs a system that will track the purchasing habits of its frequent customers.
  3. A large (Fortune 500) defense contractor needs a system that will track payments to vendors.

In: Computer Science

Why is it important for software developers to invent products that have greater usability? write in...

Why is it important for software developers to invent products that have greater usability? write in about 500 words

In: Computer Science

1 Write structured pseudocode to show the following: If you are at home, get comfortable and...

1 Write structured pseudocode to show the following: If you are at home, get comfortable and take a nap while you are sleepy, otherwise do not take a nap. 2 Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee 3 Write structured pseudocode to indicate that you will keep drying your hair while it is still wet 4 Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee

In: Computer Science

Given the following HTML code (You are not allowed to add additional id or class to...

Given the following HTML code (You are not allowed to add additional id or class to the file test.html)

test.html

  1. <h1>Down the Rabbit-Hole</h1>
  2. <div class="bb" >    
  3.    <p class="bb" >Alice was beginning to get very tired ...</p>
  4.    <br/>
  5.    <p> Alice </p>
  6. </div>
  7. <div id="aa">
  8.    <p>Down, down, down. Would the fall never come to an end</p>
  9.    <div> <p class="bb" >I wonder if I shall fall right …</p> </div>
  10. </div>
  11. <h1> Upcoming Event </h1>
  12. <p> Excitng Event: 101 </p>
  13. <p> A limited number of tickets area available. Email me. </p>

a) I want to style the text from line 7 to 10. Write the CSS code to achieve the goal so that the text from line 7 to 10 in red.

Write code here:

b) Write the CSS code to make all <p> tags of class bb in green. (I mean make line #3 #9 in green text)

Write code here:

c) Write the CSS code to make line #9 in red only.

Write code here:

d) Write the CSS code to make line#12 in red only.

Write code here:

In: Computer Science

Hi, Im not sure why this only continues to loop when option 1 is selected. Thank...

Hi, Im not sure why this only continues to loop when option 1 is selected.

Thank you

#include<iostream>
using namespace std;

class Car{
   private:
       string make;//variable
       int price;//variable
      
       public:
           Car(string make, int price){//two parameter constructor
               this->make = make;
               this->price = price;
           }
       string getMake(){//get make from user
           return this->make;
       }
       int getPrice(){//get price from user
           return this->price;
       }
};
#include <iostream>
#include<algorithm>
#include<vector>
#include<string.h>
#include<iomanip>
#include"Car.h"
using namespace std;

void DisplayMenu(){//method to display menu
   cout<<"\n1. Add car to inventory";
   cout<<"\n2. Delete car from inventory";
   cout<<"\n3. Print inventory";
   cout<<"\n4. Exit";
   cout<<"\nYour choice: ";
}

void addData(vector<Car>& Inventory){//method to add data
   string make;
   int price;
   cout<<"Type of car: ";
   cin>> make;
   cout<<"Price of car: ";
   cin>> price;
  
   Car newcar(make, price);
   Inventory.push_back(newcar);      
}

void deleteData(vector<Car>& Inventory){//method to delete data
   string carToDelete;
   cout<<"Type of car to delete: ";
   cin>>carToDelete;
   int position = -1;
   for(int i = 0; Inventory.size(); i++){
       if(carToDelete.compare(Inventory[i].getMake()) ==0)
       position = i;
   }
   if(position == -1){
   cout<<"No such car in inventory";
   return;
   }
   Inventory.erase(Inventory.begin() + position );
}

void printData(vector<Car>& Inventory){//method to print data
cout<<"\nMake"<<" Price"<<"\n";
   cout<<"----"<<" -----\n";
   for(int i = 0; i<Inventory.size(); i++){      
       cout<<setw(0)<<Inventory[i].getMake()<<setw(11)<<Inventory[i].getPrice()<<endl;
       }      
}

int main() {
   cout<<"Welcome to the JJC Dealership Inventory Program\n";
   vector<Car>Inventory;//initialize vector
   int choice = 1;//variable
  
  
   while(true){      
       DisplayMenu();//display menu
       cin>>choice; //get user choice
      
   switch(choice){//switch statement
       case 1:
           addData(Inventory);
           break;
       case 2:
           deleteData(Inventory);
           break;
       case 3:
           printData(Inventory);
       case 4:
           return 0;
           break;
       default:
           cout<<"Invalid Entry\n";
           break;
   }
   }
   return 0;
}

In: Computer Science

What is the motivation of the OR model? What are the main additions in ORDB?

What is the motivation of the OR model? What are the main additions in ORDB?

In: Computer Science