Questions
Please can you draw a flow chart for the following code : Program code for Payroll,java:...

Please can you draw a flow chart for the following code :

Program code for Payroll,java:

public class Payroll
{

public Payroll(String name,int ID,double payRate)
{
this.name=name;
this.ID=ID;
this.payRate=payRate;
}

private String name;
private double payRate,hrWorked;
private int ID;

public Payroll()
{
name="John Doe";
ID=9999;
payRate=15.0;
hrWorked=40;
}

public String getName()
{
return name;
}

public int getID()
{
return ID;
}

public void setPayRate(int payRate)
{
this.payRate=payRate;
}

public void setHrWorked(double hrWorked)
{
this.hrWorked=hrWorked;
}

public double getPayRate()
{
return payRate;
}

public double getHrWorked()
{
return hrWorked;
}

public double grossPay()
{
double grosspay=hrWorked*payRate;
return grosspay;
}

}

Program code for PayrollClient.java:

import java.util.Scanner;
class main
{
public static void main(String [] args)
{
Scanner read=new Scanner(System.in);
System.out.print("\nEnter Name:");
String name=read.next();
System.out.print("\nEnter ID:");
int ID=read.nextInt();
System.out.print("\nEnter Payrate:");
double payRate=read.nextDouble();

Payroll obj1=new Payroll(name,ID,payRate);

System.out.print("\nEnter Hours worked:");
double hrWorked=read.nextDouble();
obj1.setHrWorked(hrWorked);

Payroll obj2=new Payroll();

System.out.println("Employee details are:");
System.out.println("Name\t ID\tPayRate\tHoursWorked\tGrossPay");

System.out.println(obj1.getName()+" "+obj1.getID()+"\t"+obj1.getPayRate()+"\t"+obj1.getHrWorked()+"\t\t"+obj1.grossPay());
System.out.println(obj2.getName()+" "+obj2.getID()+"\t"+obj2.getPayRate()+"\t"+obj2.getHrWorked()+"\t\t"+obj2.grossPay());
}
}

In: Computer Science

Complete the following tasks. In each exercise, represent your answer only in DBDL. Do not use...

Complete the following tasks. In each exercise, represent your answer only in DBDL. Do not use diagrams a this point. Submit either a text file or a Word document with your work. Make sure you follow chapter 6's DBDL notation

(****** Just to clarify: this is the first question on Page 220. It says to 'produce the following reports', but what you are asked to do is use DBDL notation to create 5 tables: Guide, Trip, Customer, Reservation and TripGuides
Make sure to list the FK where they belong ******)

  1. Design a database to produce the following reports. Do not use any surrogate keys in your design.
    • For each guide, list the guide number, guide last name, guide first name, address, city, state, postal code, telephone number, and date hired.
    • For each trip, list the trip ID number, the trip name, the location from which the trip starts, the state in which the trip originates, the trip distance, the maximum group size, the type of trip (hiking, biking, or paddling), the season in which the trip occurs, and the guide number, first name, and last name of each guide. A guide may lead many trips and a trip may be led by many differen't guides.
    • For each customer, list the customer number, customer last name, customer first name, address, city, state, postal code, and telephone number.
    • For each reservation, list the trip ID number, the trip date, the number of persons included in the reservation, the price of the trip per person, the total of any additional fees per person, and the customer number, first name, and last name of the customer who made the reservation.

In: Computer Science

Instructions: Complete the following queries using the Colonial Adventure Tours database. You will find the description...

Instructions: Complete the following queries using the Colonial Adventure Tours database. You will find the description including data of this database in page 16 to page 20 in Chapter 1 in your Concepts of Database Management textbook. For each following question, create a query using the Query Design option in Access. Make sure that you save and name each query in the following manner: Query1, Query2......Query14. Query Questions:

Queries:

1. List the name of each trip that does not start in New Hampshire (NH).

2. List the last name of each guide that does not live in Massachusetts (MA).

3. List the name and start location for each trip that has the type Biking.

4. List the name of each trip that has the type Hiking and that has a distance greater than six miles.

5. List the name of each trip that has the type Paddling or that is located in Vermont (VT).

6. List the customer number, customer last name, and customer first name of each customer that lives in New Jersey (NJ), New York (NY) or Pennsylvania (PA).

7. How many trips have a type of Hiking or Biking?

8. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state.

9. How many trips originate in each state?

10. How many reservations include a trip with a price that is greater than $20 but less than $75?

11. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the result by the number of persons included in the reservation. List the reservation ID, trip ID, customer number, and total price for all reservations where the number of persons is greater than four. Use the column name TOTAL_PRICE for the calculated field.

12. What is the average distance and the average maximum group size for each type of trip?

13. How many current reservations does Colonial Adventure Tours have and what is the total number of persons for all reservations?

In: Computer Science

Create a class called Student which stores • the name of the student • the grade...

Create a class called Student which stores

• the name of the student

• the grade of the student

• Write a main method that asks the user for the name of the input file and the name of the output file. Main should open the input file for reading . It should read in the first and last name of each student into the Student’s name field. It should read the grade into the grade field.

• Calculate the average of all students’ grades.

• Open the output file, for writing, and print all the students’ names on one line and the average on the next line.

• Average should only have 1 digit after the decimal

• “Average” should be left justified in a field of 15 characters. The average # should be right justified in a field of 10 spaces

Sample input:

Minnie Mouse 98.7

Bob Builder 65.8

Mickey Mouse 95.1

Popeye SailorMan 78.6

Output:

Minnie Mouse, Bob Builder, Mickey Mouse, Popeye SailorMan

Average:       84.5

How can I fix my code to get the same output

public class Student {
public static void main(String[] args)throws IOException{
Scanner k=new Scanner(System.in);
String name;
float grade;
float Average=(float) 0.0;
float sum=(float) 0.0;
  
System.out.println("Enter input file name:");
String input=k.nextLine();
System.out.println("Enter output file name:");
String output=k.nextLine();
  
PrintWriter pw = new PrintWriter("students.txt");
pw.print("Minnie Mouse 98.7\nBob Builder 65.8\nMickey Mouse 95.1\nPopeye SailorMan 78.6\n");
pw.close();
PrintWriter pw2 = new PrintWriter("students2.txt");
pw2.print("Donald Duck 77.77\nTweety Bird 55.555\nCharlie Brown 95.231\n");
pw2.close();
/* End of creating the input file */
while(k.hasNext())
{
name=k.next();
grade=k.nextFloat();
Average+=grade;
sum++;
System.out.printf("name, ", name);
}
grade=Average/sum;
System.out.printf("\n%-15s%10.1f","Average", grade);   
/* test output file */
Scanner testOutput = new Scanner(new File("average.txt"));
while(testOutput.hasNext())
System.out.println(testOutput.nextLine());
/* end of test output file */
}
}
  

In: Computer Science

Exercise 13-22 Culver Machinery Co. manufactures equipment to a very high standard of quality; however, it...

Exercise 13-22

Culver Machinery Co. manufactures equipment to a very high standard of quality; however, it must still provide a warranty for each unit sold, and there are instances where the machines do require repair after they have been put into use. Culver started in business in 2020, and as the controller, you are trying to determine whether to use the assurance-type or service-type warranty approach to measure the warranty obligation. You would like to show the company president how this choice would affect the financial statements for 2020, and advise him of the better choice, keeping in mind that the service-type approach is consistent with IFRS, and that there are plans to take Culver public in a few years.

You have determined that sales on account for the year were 1,100 units, with a selling price of $3,200 each. Ignore any cost of goods sold. The warranty is for two years, and the estimated warranty cost averages $210 per machine. Actual costs of servicing warranties for the year were $115,500. You have done some research and determined that if the service-type approach were to be used, the portion of revenue allocated to the warranty portion of the sale would be $350. Because the costs of servicing warranties are not incurred evenly, warranty revenues are recognized based on the proportion of costs incurred out of the total estimated costs.

A.) For the assurance-type approach, prepare the necessary journal entries to record all of the transactions described. Payments for completed warranty repairs are paid in cash.

Account Titles and Explanation Debit Credit
(Account Name)
(Account Name)
To record sales on account
(Account Name)
(Account Name)
To record payment of warranty expense
(Account Name)
(Account Name)
To accrue warranty expense

Determine the warranty liability and expense amounts on the financial statements at the end of 2020.

Warranty Liability: $________

Warranty Expense: $_________

B.) For the service-type approach, prepare the necessary journal entries to record all of the transactions described.

Account Titles and Explanation Debit Credit
(Account Name)
(Account Name)
(Account Name)
To record the sale
(Account Name)
(Account Name)
to record warranty cost incurred
(Account Name)
(Account Name)
To remeasure the unearned revenue account

Determine the unearned revenue and expense amounts on the financial statements at the end of 2020.

Unearned Revenue: $________

Warranty Expense: $_________

(List of Possible Accounts for all parts of question: No Entry, Accounts Receivable, Materials Cash Payables, Cash, Warranty Liability, Sales Revenue, Warranty Revenue, Unearned Revenue, Warranty Expense)

In: Accounting

You can complete this with Eclipse (or BlueJ if you like). Here are the requirements: Write...

You can complete this with Eclipse (or BlueJ if you like). Here are the requirements:

Write a Person class. A Person has properties of name and age. You construct a Person object by providing the name and age in that order. We want to be able to get and set the name. We want to be able to get the age and to increase the age by 1 when the person has a birthday.

What will the object need to remember? name and age - those are the instance variables.

Person class has this constructor :

  • public Person (String theName, int theAge) - Constructs a new person with the given name and age. Remember that the job of the constructor is to initialize the instance variables

It has these methods.

  • public String getName() - Gets the name of this Person

  • public int getAge() - Gets the age of this Person

  • public void setName(String newName) - Sets the new name for this Person

  • public void haveBirthday() - Adds one to this Person's age

The methods and constructor are provided as stubs in the starter file. A stub has a method header and a body with no implementation.

  • The stub for an accessor returns 0 for numbers or null for objects like strings.

  • A stub for a mutator method has no body at all.

A class with stubs for methods will compile, but it does not yet behave correctly. You still need to supply implementation and the correct return values. The idea is that you can implement one method at a time and test it since the class will compile. This technique is frequently used in development of applications.

Javadoc is also provided for this class. Study how it is done so you can write the required Javadoc in the next problem. Notice that the Javadoc says what the method will do when complete - not what the stub does.

You are given a PersonTester class along with the starter for the Person class. Copy both into your BlueJ project. PersonTester is an application with a main method. To run your application, right click on it and execute its main method.

Given code:

public class Person
{
    /**
     * Constructs a new person with the given name and age
     * @param theName the name of this Person object
     * @param theAge the age of this Person object
     */
    public Person (String theName, int theAge)
    {
    }

    /**
     * Gets the name of this Person
     * @return the name of this person
     */
    public String getName()
    {
       return null;
    }

    /**
     * Gets the age of this Person
     * @return this presons age
     */
    public int getAge()
    {
       return 0;
    }

    /**
     * Sets the new name for this Person
     * @param newName the new name for this Person
     */
    public void setName(String newName)
    {
    }

    /**
     * Adds one to this Person's age
     */
    public void haveBirthday()
    {
    }
}

In: Computer Science

find all the errors c++ should be able to be compiled and run to perform the...

find all the errors c++

should be able to be compiled and run to perform the task

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

class Customer {
    // Constructor
    void Customer(string name, string address) : cust_name(name), cust_address(address)
    {
         acct_number = this.getNextAcctNumber();
    }

    // Accessor to get the account number
    const int getAcctNumber() { return acct_number; }

    // Accessor to get the customer name
    string getCustName(} const { return cust_name; }

    // Accessor to get the customer  address
    string getCustAddress() const { return cust_address; }

    // Set a customer name and address
    static void set(string name, string address);

    // Set a customer address
    void setAddress(string cust_address) {  cust_address = cust_address; }

    // Get the next account number for the next customer.
    static const unsigned long getNextAcctNumber() { ++nextAcctNum; }

    // input operator
    friend Customer operator>> (istream& ins, Customer cust);

    // output operator
    friend void operator<< (const ostream& outs, const Customer &cust) const;

  private
    string cust_name;                           // customer name

    unsigned long acct_number;                  // account number

    string cust_address;                        // customer address

    static const unsigned long nextAcctNum;
};

const int MAX_CUSTOMERS=20; // Change this to a smaller number to test.

// Declare the class variable nextAcctNum
unsigned long Customer::nextAcctNum=10000;

// set the customer name and address
// @param name: the customer name
// @param address: the account address
void Customer::set(string name, string address) : cust_name(name), cust_address(address)
{
}

// input operator reads customer as a name and address on two separate lines.
// name
// address1
friend Customer Customer::operator>>(istream& ins, Customer cust)
{
    getline(cin, cust.cust_name);
    getline(cin, cust.cust_address);
    return *this;
}

// output operator
friend void Customer::operator<<(const ostream& out, const Customer& cust) const
{
    out << acct_number << “: “ << cust_name << “\n“ << cust_address << endl;
}

int main()
{
    Customer custList[MAX_CUSTOMERS];

    cout << “Enter the customer list one per line\n”;
    // Read in customer list.
    for (int i = 0; i < MAX_CUSTOMERS; i++)
    {
       cin >> custList[i];
    }

    // Get customer address changes
    for (int i = 0;  i < MAX_CUSTOMERS; i++)
    {   
       int answer;
       cout << “Address change for  “ << custList.acct_number[i] << “? (y or n) : “;
       cin >> answer;
       if (answer == ‘y’) {
          cin >> input;
          custList.setAddress[i] = input;
       }
    }
‘
    // Write out customer list.
    for (int i = 0; I < MAX_CUSTOMERS; i++)
    {
        cout << custList[i];
    }

    return 0;
}

In: Computer Science

EXCESS CAPACITY Krogh Lumber's 2016 financial statements are shown here. Krogh Lumber: Balance Sheet as of...

EXCESS CAPACITY

Krogh Lumber's 2016 financial statements are shown here.

Krogh Lumber: Balance Sheet as of December 31, 2016 (Thousands of Dollars)
Cash $1,800 Accounts payable $7,200
Receivables 10,800 Notes payable 3,472
Inventories 12,600 Accrued liabilities 2,520
Total current assets $25,200 Total current liabilities $13,192
Mortgage bonds 5,000
Net fixed assets 21,600 Common stock 2,000
Retained earnings 26,608
Total assets $46,800 Total liabilities and equity $46,800
Krogh Lumber: Income Statement for December 31, 2016 (Thousands of Dollars)
Sales $36,000
Operating costs including depreciation 30,783
Earnings before interest and taxes $5,217
Interest 1,017
Earnings before taxes $4,200
Taxes (40%) 1,680
Net income $2,520
Dividends (60%) $1,512
Addition to retained earnings $1,008

Assume that the company was operating at full capacity in 2016 with regard to all items except fixed assets; fixed assets in 2016 were being utilized to only 76% of capacity. By what percentage could 2017 sales increase over 2016 sales without the need for an increase in fixed assets? Round your answer to two decimal places.
%


Now suppose 2017 sales increase by 25% over 2016 sales. Assume that Krogh cannot sell any fixed assets. All assets other than fixed assets will grow at the same rate as sales; however, after reviewing industry averages, the firm would like to reduce its operating costs/sales ratio to 85% and increase its total liabilities-to-assets ratio to 42%. The firm will maintain its 60% dividend payout ratio, and it currently has 1 million shares outstanding. The firm plans to raise 35% of its 2017 forecasted interest-bearing debt as notes payable, and it will issue bonds for the remainder. The firm forecasts that its before-tax cost of debt (which includes both short- and long-term debt) is 11.5%. Any stock issuances or repurchases will be made at the firm's current stock price of $40. Develop Krogh's projected financial statements. What are the balances of notes payable, bonds, common stock, and retained earnings? Round your answers to the nearest hundredth of thousand of dollars.
Krogh Lumber Pro Forma Income Statement December 31, 2017 (Thousands of Dollars)
2016 2017
Sales $36,000 $
Operating costs (includes depreciation) 30,783
EBIT $5,217 $
Interest expense 1,017
EBT $4,200 $
Taxes (40%) 1,680
Net Income $2,520 $
Dividends $1,512 $
Addition to RE $1,008 $
Krogh Lumber Pro Forma Balance Statement December 31, 2017 (Thousands of Dollars)
2016 2017
Assets
Cash $1,800 $
Accounts receivable 10,800
Inventories 12,600
Fixed assets 21,600
Total assets $46,800 $
Liabilities and Equity
Payables + accruals $9,720 $
Short-term bank loans 3,472
  Total current liabilities $13,192 $
Long-term bonds 5,000
  Total liabilities $18,192 $
Common stock 2,000
Retained earnings 26,608
  Total common equity $28,608 $
Total liab. and equity $46,800 $

In: Accounting

Pastina Company sells various types of pasta to grocery chains as private label brands.


Pastina Company sells various types of pasta to grocery chains as private label brands. The company's fiscal year-end is December 31. The unadjusted trial balance as of December 31, 2016, appears below.

   

  Account Title Debits Credits
  Cash 30,000     
  Accounts receivable 40,000     
  Supplies 1,500     
  Inventory 60,000     
  Note receivable 20,000     
  Interest receivable 0     
  Prepaid rent 2,000     
  Prepaid insurance 0     
  Office equipment 80,000     
  Accumulated depreciation—office equipment   30,000   
  Accounts payable   31,000   
  Salaries and wages payable   0   
  Note payable   50,000   
  Interest payable   0   
  Deferred revenue   0   
  Common stock   60,000   
  Retained earnings   24,500   
  Sales revenue   148,000   
  Interest revenue   0   
  Cost of goods sold 70,000     
  Salaries and wages expense 18,900     
  Rent expense 11,000     
  Depreciation expense 0     
  Interest expense 0     
  Supplies expense 1,100     
  Insurance expense 6,000     
  Advertising expense 3,000     
     
          Totals 343,500    343,500   
     
 
  Information necessary to prepare the year-end adjusting entries appears below.
1. Depreciation on the office equipment for the year is $10,000.
2.

Employee salaries and wages are paid twice a month, on the 22nd for salaries and wages earned from the 1st through the 15th, and on the 7th of the following month for salaries and wages earned from the 16th through the end of the month. Salaries and wages earned from December 16 through December 31, 2016, were $1,500.

3.

On October 1, 2016, Pastina borrowed $50,000 from a local bank and signed a note. The note requires interest to be paid annually on September 30 at 12%. The principal is due in 10 years.

4.

On March 1, 2016, the company lent a supplier $20,000 and a note was signed requiring principal and interest at 8% to be paid on February 28, 2017.

5.

On April 1, 2016, the company paid an insurance company $6,000 for a two-year fire insurance policy. The entire $6,000 was debited to insurance expense.

6. $800 of supplies remained on hand at December 31, 2016.
7.

A customer paid Pastina $2,000 in December for 1,500 pounds of spaghetti to be delivered in January 2017. Pastina credited sales revenue.

8.

On December 1, 2016, $2,000 rent was paid to the owner of the building. The payment represented rent for December 2016 and January 2017, at $1,000 per month.

8.

value:
10.00 points

Required information

Required:
1. & 2.

Post the unadjusted balances and adjusting entires into the appropriate t-accounts. (Enter the number of the adjusting entry in the column next to the amount. Do not round intermediate calculations.)

3.

Prepare an adjusted trial balance.

For requirement 4, assume that no common stock was issued during the year and that $4,000 in cash dividends were paid to shareholders during the year.
 
4.

Prepare the income statement, statement of shareholders' equity and classified balance sheet for the year ended December 31, 2016. (For Balance Sheet only, items to be deducted must be indicated with a negative amount. Other expenses should be indicated with a minus sign.)

5.

Prepare closing entries. (If no entry is required for a particular transaction, select "No journal entry required" in the first account field.)

6.

Prepare a post-closing trial balance.

In: Accounting

Krogh Lumber's 2016 financial statements are shown here. Krogh Lumber: Balance Sheet as of December 31,...

Krogh Lumber's 2016 financial statements are shown here.

Krogh Lumber: Balance Sheet as of December 31, 2016 (Thousands of Dollars)
Cash $1,800 Accounts payable $7,200
Receivables 10,800 Notes payable 3,472
Inventories 12,600 Accrued liabilities 2,520
Total current assets $25,200 Total current liabilities $13,192
Mortgage bonds 5,000
Net fixed assets 21,600 Common stock 2,000
Retained earnings 26,608
Total assets $46,800 Total liabilities and equity $46,800
Krogh Lumber: Income Statement for December 31, 2016 (Thousands of Dollars)
Sales $36,000
Operating costs including depreciation 30,783
Earnings before interest and taxes $5,217
Interest 1,017
Earnings before taxes $4,200
Taxes (40%) 1,680
Net income $2,520
Dividends (60%) $1,512
Addition to retained earnings $1,008
  1. Assume that the company was operating at full capacity in 2016 with regard to all items except fixed assets; fixed assets in 2016 were being utilized to only 65% of capacity. By what percentage could 2017 sales increase over 2016 sales without the need for an increase in fixed assets? Round your answer to two decimal places.

Now suppose 2017 sales increase by 25% over 2016 sales. Assume that Krogh cannot sell any fixed assets. All assets other than fixed assets will grow at the same rate as sales; however, after reviewing industry averages, the firm would like to reduce its operating costs/sales ratio to 84% and increase its total liabilities-to-assets ratio to 42%. The firm will maintain its 60% dividend payout ratio, and it currently has 1 million shares outstanding. The firm plans to raise 35% of its 2017 forecasted interest-bearing debt as notes payable, and it will issue bonds for the remainder. The firm forecasts that its before-tax cost of debt (which includes both short- and long-term debt) is 10.5%. Any stock issuances or repurchases will be made at the firm's current stock price of $40. Develop Krogh's projected financial statements. What are the balances of notes payable, bonds, common stock, and retained earnings? Round your answers to the nearest hundredth of thousand of dollars.

  1. Krogh Lumber Pro Forma Income Statement December 31, 2017 (Thousands of Dollars)
    2016 2017
    Sales $36,000 $
    Operating costs (includes depreciation) 30,783
    EBIT $5,217 $
    Interest expense 1,017
    EBT $4,200 $
    Taxes (40%) 1,680
    Net Income $2,520 $
    Dividends $1,512 $
    Addition to RE $1,008 $
    Krogh Lumber Pro Forma Balance Statement December 31, 2017 (Thousands of Dollars)
    2016 2017
    Assets
    Cash $1,800 $
    Accounts receivable 10,800
    Inventories 12,600
    Fixed assets 21,600
    Total assets $46,800 $
    Liabilities and Equity
    Payables + accruals $9,720 $
    Short-term bank loans 3,472
      Total current liabilities $13,192 $
    Long-term bonds 5,000
      Total liabilities $18,192 $
    Common stock 2,000
    Retained earnings 26,608
      Total common equity $28,608 $
    Total liab. and equity $46,800 $

In: Finance