Sunland Corporation owns machinery that cost $24,000 when
purchased on July 1, 2017. Depreciation has been recorded at a rate
of $2,880 per year, resulting in a balance in accumulated
depreciation of $10,080 at December 31, 2020. The machinery is sold
on September 1, 2021, for $12,600.
Prepare journal entries to (a) update depreciation for 2021 and (b)
record the sale. (Credit account titles are
automatically indented when amount is entered. Do not indent
manually. If no entry is required, select "No Entry" for the
account titles and enter 0 for the amounts.)
In: Accounting
The list and dictionary object types are two of the most important and often used types in a Python program. Compare the functionalities of those two objects. What are some ways to insert, update, and remove elements from lists and dictionaries? Why would you choose one data type over another? Provide code examples demonstrating the usages of both data types. Actively participate in this discussion by providing constructive feedback on the criteria, rationales, and examples posted by your peers. Provide at least one reference to support your findings.
In: Computer Science
This is a python program. Put comments explaining the code, please.
Suppose you have been tasked with writing a Python program (using linked lists) to keep track of computer equipment. For each piece of equipment, we track its name, purchase date, purchase amount, and quantity on hand. Write a program that completes the following tasks:
allow the user to add a piece of equipment to the front of the list;
allow the user to update the quantity of a piece of equipment;
calculate and display (to the screen) the total value (in dollars) of ALL inventory
In: Computer Science
Q1# Consider the following string:
String hello = "Hi girls! hope your assignment1 is very
easy.";
a. What is the value displayed by the expression
hello.length()?
b. What is the value returned by the method call
hello.charAt(12)?
c. Write an expression that refers to the letter p in the string
referred to by hello
Q2# Modify the program to use a "while-do" loop instead of "for"
loop.
int sum = 0;
int number = lowerbound; // declare and init loop index
variable
while (number <= upperbound) { // test
sum += number;
++number; // update
}
In: Computer Science
Create two data documents containing a patientRecord
– one in XML and another in JSON
format
Your patientRecord must contain the following data:
-A patient’s name & ID number
-The date of his/her last appointment & the date of the last update
-The patient’s allergies – you must include 2 – one for a food allergy and one for a drug
allergy
-The patient’s preference – you must include 2 – one for a doctor and one for his/her
method of contact (which would have a value of text, phone, or email)
In: Computer Science
.text
.globl main
main:
lui $8, _______ # the address of pairs (SPIM:0x1000;
Mars:0x1001)
lw $9, 0(_____) # get the number of pairs (6) and
store in $9
ori $10, $0, 0 # use $10 to store the height sum
ori $11, $0, 0 # use $11 to store the weight sum
ori $12, $0, 0 # use $12 to count
ori $13, $0, 0 # use $13 to store temp values;
addiu $8, $8, ___ # increase the address to get the first
pair;
loop: ___________________ # jump to compute the average if
count==number of pairs
____ $13, ____ # get height and store in $13
add ___________ # update the height sum using
$10
addiu $8, $8, ___ # increase the address
____ $13, ____ # get weight and store in $13
add ___________ # update the weight sum using
$11
addiu $8, $8, ___ # increase the address
add ___________ # increase count
j loop
ave: div ________ # compute the average of
height
___ $10 # store the height average in $10
div ________ # compute the average of weight
___ $11 # store the weight average in $11
.data
pairs: .word 6 # number of pairs
.word 30, 60 # first pair: height, weight
.word 65, 51
.word 27, 67
.word 68, 270
.word 62, 115
.word 42, 43
## End of file
In: Computer Science
Java Language Only
Use Java FX
In this project we will build a BMI calculator. BMI is calculated using the following formulas:
| Measurement Units | Formula and Calculation |
|---|---|
| Kilograms and meters (or centimetres) |
Formula: weight (kg) / [height (m)]2 The formula for BMI is weight in kilograms divided by height in meters squared. If height has been measured in centimetres, divide by 100 to convert this to meters. |
| Pounds and inches |
Formula: 703 x weight (lbs) / [height (in)]2 When using English measurements, pounds should be divided by inches squared. This should then be multiplied by 703 to convert from lbs/inches2 to kg/m2. |
Please update the BMIController.java file. Only modify the changeUnits and calculateResult methods.
BMI Controller code below:
package bmi;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
public class BMIController {
@FXML
private Button calculate;
@FXML
private Label heightLBL;
@FXML
private Label result;
@FXML
private Label weightLBL;
@FXML
private RadioButton us;
@FXML
private RadioButton metric;
@FXML
private TextField weightTF;
@FXML
private TextField heightTF;
@FXML
public void changeUnits(ActionEvent event)
{
//This method should
update the labels to display correct unites
}
@FXML
public void calculateResult(ActionEvent event)
{
// This method should
calculate the BMI
}
}
In: Computer Science
Program is to be written in C++ using Visual studios Community
You are to design a system to keep track of either a CD or DVD/Blu-ray collection. The program will only work exclusively with either CDs or DVDs/Blu-rays since some of the data is different. Which item your program will work with will be up to you. Each CD/DVD/Blu-ray in the collection will be represented as a class, so there will be one class that is the CD/DVD/Blu-ray. The CD class will be limited to five (5) songs, and the class will need to keep an array of five (5) strings for the song titles. It should also maintain the length of each song and the total length of the CD, as well as the artist name. The DVD/Blu-ray class will have a data member for the title of the movie, length of the movie, the year of the movie, and for the names of two of the main actors in the movie. There will be a class that maintains the list of CD/DVDs/Blu-rays. This list can be limited to just 5 CD/DVD/Blu-rays and provide a method to add a CD/DVD/Blu-ray, to remove a CD/DVD/Blu-ray, and to update a CD/DVD/Blu-ray.
The program should provide a menu for the user to be able to add, delete, update and display the information in a CD/DVD/Blu-ray. Include a comment block at the top of the code file of what the program does.
In: Computer Science
C++ please
Instructions
Download and modify the Lab5.cpp program.
Currently the program will read the contents of a file and display each line in the file to the screen. It will also display the line number followed by a colon. You will need to change the program so that it only display 24 lines from the file and waits for the user to press the enter key to continue.
Do not use the system(“pause”) statement.
Download Source Lab 5 File:
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
ifstream file; // File stream object
string name; // To hold the file name
string inputLine; // To hold a line of input
int lines = 0; // Line counter
int lineNum = 1; // Line number to display
// Get the file name.
cout << "Enter the file name: ";
getline(cin, name);
// Open the file.
file.open(name);
// Test for errors.
if (!file)
{
// There was an error so display an error
// message and end the program.
cout << "Error opening " << name << endl;
}
else
{
// Read the contents of the file and display
// each line with a line number.
while (!file.eof())
{
// Get a line from the file.
getline(file, inputLine, '\n');
// Display the line.
cout << setw(3) << right << lineNum
<< ":" << inputLine << endl;
// Update the line display counter for the
// next line.
lineNum++;
// Update the total line counter.
lines++;
}
// Close the file.
file.close();
}
return 0;
}
In: Computer Science
Implement a simple banking system in Java. Your application should demonstrate the following. Upon running the java code, first the application should welcome the user, then ask the user to give one of the options: 1) display the balance summary, 2) withdraw money, or 3) deposit money.
Based on the options your code should perform the following operations such as 1) read the transaction details from a file and display them on the screen. 2) ask the user to enter the amount he wants to withdraw and debit the withdrawal amount from the balance amount. It has to update the file and display the transaction summary. The system should not allow an attempt to withdraw an amount greater than the balance. 3) ask the user to enter the amount he wants to deposit, credit the balance and update the file. It should display the transaction summary.
The records in the file should contain transaction number,
transaction type, amount withdrawn, or amount deposited, and
balance.
Example:
1 Deposit 100.0$ 1100.0$
2 Withdraw 50.0$ 1050.0$
The welcome screen should look like:
Welcome to our Banking System!
Enter your Option in a number: 1. Display balance 2. Deposit amount
3. Withdraw amount
We assume that there is an opening balance of 1000 available in the
system (Assign balance=1000.0 in the beginning of the code). Also,
while running first start by choosing deposit option or withdraw
option.
In: Computer Science