Write a program that prompts for the lengths of the sides of a triangle and reports the three angles. Make sure you have a good introduction stating what the program does when it is run, and a helpful prompt for the user when asking for input:
i.e. Here is the generated output from a sample program:
This program computes the angles of a triangle given the lengths of the sides.
What is the length of side 1? <wait for user input>
What is the length of side 2? <wait for user input>
What is the length of side 3? <wait for user input>
angle 1 = <angle in degrees for side 1, side 2, and side 3>
angle 2 = <angle in degrees for side 2, side 3, and side 1>
angle 3 = <angle in degrees for side 3, side 1, and side 2>
Requirements
Your program must have at least 1 function with parameters, that when called with arguements returns a value.
Hints
Save your program as triangle_angles.py and attach it.
In: Computer Science
Which of the following statement will, move the file pointer to the third ‘r’ in the file show below. Assume the newline character is 1 byte. Select all that apply.
With
great
power
comes
great
responsibility
Answers:
Spidey.seekg(-19L, ios:end);
Spidey.seekg(‘r’, ios:beg);
Spidey.seekg(24, ios:cur);
Spidey.seekg(“r?r?r”, ios:beg);
In: Computer Science
Describe PowerShell and give examples of the syntax.
In: Computer Science
You are expected to design a circuit with (3bit)counter and skip
next signal with other necessary control signals to complete your
labwork.
You have to include your gdf file and simulation
file(scf).
Zip/Rar your project files.
In: Computer Science
Web Programming Task + Database sql
In: Computer Science
ASSEMBLY LANGUAGE PROGRAMMING
1. The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________.
2. The decimal equivalent of the unsigned 8-bit hex number 0B4H is ______________.
3. The value of the expression ‘H’ – ‘B’ is less than / equal to / greater than that of the expression ‘L’ – ‘C’.
4. If the .data segment contains declarations A BYTE 2 DUP (‘a’), ‘+’ B BYTE 3 DUP (‘b’), 0 C BYTE 4 DUP (‘c’), ‘–’ D BYTE 5 DUP (‘d’), 0 then the instruction input A, D, 6 will display a Windows dialog box with title _______________________________.
5. If eax = 302B59A1H, and ebx = 700CD37DH, then the instruction add ax, bx will leave the value ______________________________ in the eax register.
6. If eax = 0FFFFFFFFH, and edx = 0FFFFFFFFH, then the instruction imul edx will leave the value ______________________________ in the edx register.
7. If eax = 0D000000DH, and edx = 50000005H, then the instruction idiv dl will leave the value ______________________________ in the eax register.
8. If ax = 3BC4H, then the following instructions cmp ah, al jg Label will / will not cause a jump to Label.
9. If ax = 3BC4H, then the following instructions cmp ah, al ja Label will / will not cause a jump to Label.
10. The following instructions mov eax, 0 mov ecx, 1100B L1: inc eax loop L1 will leave the value ______________________________ in the eax register.
In: Computer Science
1. The functional dependencies for the ProAudio relation:
c_id -> f_name, l_name, address, city, state, zip
item_id -> title, price
ord_no -> c_id, order_date
ord_no + item_id -> shipped
zip -> city, state
Original ProAudio relation:
c_id | f_name | I_name | address | city | state | zip | ord_no | item_id | title | price | order_date | shipped |
01 | Jane | Doe | 123 Elm St | Ely | NV | 11111 | 1-1 | 12-31 | More Blues | 8.99 | 12-2-00 | no |
02 | Fred | Fish | 321 Oak St | Ely | NV | 11111 | 2-1 | 21-12 | Jazz Songs | 9.99 | 11-9-00 | yes |
01 | Jane | Doe | 123 Elm St | Ely | NV | 11111 | 1-2 | 12-21 | The Blues | 8.99 | 12-2-00 | yes |
determining functional dependencies for ProAudio database
Normalization is a set of rules that ensures the proper design of a database. In theory, the higher the normal form, the stronger the design of the database.
Use the file for Functional Dependencies Above to answer the following questions:
Now that you are familiar with the mission statement and the entities and attributes the for ProAudio:
In: Computer Science
Using the Web or other resources, research an example of Cyber Terrorism.
Write a brief Discussion describing the terrorism attack and it's aftermath. Comment on ways the attack could have been prevented.
Post between 300 and 400 words.
In: Computer Science
ou must write tests for the following:
You must write tests for the following (which may include Custom Exceptions):
Tests are written such that any deposit that is made greater than 10000 is not accepted.
Tests are written such that balance in the BankAccount does not go below 0.
Care should be taken for above tests at the time of Initial Deposit and at the time of Withdrawal and future Deposits.
Tests should be written such that the Bank AccountID only accepts a string of length 4 with first letter as a character followed by 3 integers, Eg., "A001", is a valid AccountID.
==================================================================================================================
java code
=============
public class BankAccount { private String accountID; private double balance; /** Constructs a bank account with a zero balance @param accountID - ID of the Account */ public BankAccount(String accountID) { balance = 0; this.accountID = accountID; } /** Constructs a bank account with a given balance @param initialBalance the initial balance @param accountID - ID of the Account */ public BankAccount(double initialBalance, String accountID) { this.accountID = accountID; balance = initialBalance; } /** * Returns the Account ID * @return the accountID */ public String getAccountID() { return accountID; } /** * Sets the Account ID * @param accountID */ public void setAccountID(String accountID) { this.accountID = accountID; } /** Deposits money into the bank account. @param amount the amount to deposit */ public void deposit(double amount) { balance += amount; } /** Withdraws money from the bank account. @param amount the amount to withdraw @return true if allowed to withdraw */ public boolean withdraw(double amount) { boolean isAllowed = balance >= amount; if (isAllowed) balance -= amount; return isAllowed; } /** Gets the current balance of the bank account. @return the current balance */ public double getBalance() { return balance; } }
==========================================
In: Computer Science
Convert the following binary floating point to decimal
IEEE 32-bit floating point format.
0 1000 0101 000 0100 1101 0000 0000 0000
In: Computer Science
(Triangle Inequality) Write a program triangle.py that takes three integers as command-line arguments and writes True if each one of them is less than or equal to the sum of the other two and False otherwise. This computation tests whether the three numbers could be the lengths of the sides of some triangle.
$ python3 triangle.py
3
4
5
True
$ python3 triangle.py
2
4
7
False
In: Computer Science
1) Tracing is a debugging technique that examines the computer system after each instruction is executed, while breakpoints can be set at points of interest to examine the system. Which technique is better?
In: Computer Science
3. (Exercise 3.4) Use the Marriage data from the mosaicData package a) Create a bar plot to show the frequency counts for each race b) Create a histogram to show the age distribution c) What distribution can you see for age? (Use comments to write in your R Markdown file) d) Create a time-series plot to show the delay by ceremony date (Note: you need to create a vector x<-1:98 first, and then create a new data frame with x=x and y=delay.)
In: Computer Science
24.10 Lab Ch24: MergeSortDouble
Create a class MergeSortDouble and implement a
sort(double[]) method using merge sort
algorithm.
Test will call the sort() method.
java please!
In: Computer Science
We plan to develop customer’s database that stores customer’s number (ID), first name, last name and balance. The program will support three operations: (a) reading and loading customer’s info from the text file, (b) entering new customer’s info, (c) looking up existing customer’s info using customer’s number(ID), (d) deleting the customer’s info and (e) the updated database will be stored in the text file after the program terminate.
Customer’s database is an example of a menu-driven program. When the program begins to execute, it first read the text file and upload customer’s info. Then it presents the user with a list of commands. The user can enter as many commands as desired, in any order. The a command prompts the user to enter customer’s number (ID), first name, last name and balance, which are then stored in the program’s database. The f command prompts the user to enter a customer number and then display the corresponding record on the screen. The q command saves the information in the database to the file specified by the user and terminate program.
Based on the project description, please design classes and their corresponding methods. You need describe each method and write API for each method (Leave method body blank) (Hint: you need design one driver class, one database class and one customer record class). Based on your design, please draw the UML diagram as well.
database.txt
12345 Sebastian vanDelden 123.22
11111 Sarah Smith 45.89
22222 Sue Johnson 7765.98
33333 Billy Hunts 374.99
Based on your design/code, please draw a simple but detailed UML diagram as well? (This is the question that needs to be answered!) the code isn't needed for this.
In: Computer Science