Description
Write piece of code (function) in C/C++ that arranges char elements in binary file in alphabetical order.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Here is source code of the C program to sort the names in an alphabetical order. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
/*
* C program to read N names, store them in the form of an array
* and sort them in alphabetical order. Output the given names and
* the sorted names in two columns side by side.
*/
#include <stdio.h>
#include <string.h>
void main()
{
char name[10][8], tname[10][8], temp[8];
int i, j, n;
printf("Enter the value of n \n");
scanf("%d", &n);
Completion Status:
100%
Review
Review
Anonymous
Great! Studypool always delivers quality work.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
CSCC Database Fundamentals Project
Use Draw.io***I attached Project 3 which I already did. I hope it gives you some reference***In your previous assignment y ...
CSCC Database Fundamentals Project
Use Draw.io***I attached Project 3 which I already did. I hope it gives you some reference***In your previous assignment you create a diagram for the new database. And you worked to understand the data as much as you could, but there were questions about what some of the data given you represents. In this case study we look at the meaning of the data that was given and you go back and refine your design again, but also begin developing the database in SQL Server.You asked several different employees (portfolio managers and client services representatives to walk you through the data provided) and you created a matrix of information (meta-data) about the data from the spreadsheets.Client List Information:
Client Id
The client id is provided to us through a brokerage company. We have no control over how this ID is created or what it looks like.
Client Name
We use the investor's name (for individual investment accounts) or the company name as the client name. Generally, we also add what kind of account this is "Pension," "401K," etc., to the end of the name.
Account Type
Currently we have four different account types:
P1 - Pension fund (pool #1).
P2 - Pension fund (pool #2).
I1 - Individual investor's fund.
K1 - 401K fund.
When we manage money from our individual client's we pool those funds into one of these four current accounts. We don't mix individual investor's money with pension funds, for example. The number of account types can change as the company grows.
AUM
This stands for Assets Under Management. And it represents the total current investment amount for each account. We add all AUMs together to know what the company's total AUM is.
Investor Contact
The is the name or names of the people who are either client or the client's representative(s). There can be multiple contacts for a single account. Generally, it is no more than two people, but there's nothing to say it can't be more than two.
Phone
This is the phone for the contact person.
Inception
This is the date that we started investing for this client.
Strategy
Each client chooses an investment strategy or strategies for their money. Currently, we have four investment strategies available to our clients:
LCV - Large Cap Value account
MCG - Mid Cap Growth account
QNT - Quant funds account
SCG - Small cap growth
A client can choose multiple investment strategies, but this means there will be multiple accounts for the same client. An example of this is the City of Ferguson Municipal 401K. They split their investment money between three different investment strategies.Each strategy has different risks and expected rates of return. With more risk comes more expectation that the investment will perform better.
C/S Representative
This is the person at National Investments who handles all client communication and reporting.
Investment Manager
This is the person at National Investments who is responsible for the investment decisions on behalf of the client. In reality, the investment manager is tied to the strategy—not to the client. For example, Peter Denning manages the Large Cap Value strategy, hence he is the manager for the three companies in the example data that have selected the LCV funds.
Holdings Report Information:
Ticker
This is the stock symbol for the equity that is being held in the account. For example, AMZN is the unique symbol for Amazon while MSFT is the unique symbol for Microsoft. These tickers (symbols) are defined by the exchange where the company's stocks are traded.
Name
The name of the company associated with the ticker.
Shares
This is the number of shares of stock owned by each investor.
Price
Each company's share price is determined by the market. We always record the latest share price from the market.
Current Value
This is the value of each investment and is determined as Shares X Price.
Additional Notes:You also recorded some additional notes in your interactions with various people, as follows:
Any investor can have multiple accounts at National Investments. Each account must be kept separate from the others.
In the Client List example data, there is a note about someone named Kevin Riley. In this case, Kevin is the investor contact, however, he does not work for the City of Ferguson. Frequently, an investor will hire an outside consultant who becomes the investment contact. The role of the consultant is to ensure that the investor's money is handled properly. These consultants typically perform audits for the investor and help guide the investor in their decision making.
As National Investments grows, it will have more clients and potentially more strategies and account types.
AUM is important because it is a measure both of the value of any individual account, and when added all together it is the total amount of money National Investments is managing.Purpose:You know feel that you have more information than you did before and can begin to rethink and possibly refine your initial database diagram. You can now also begin thinking about the actual implementation of your design.Task:In preparing your progress report you will need to perform all the following:1. A copy of your Draw.IO diagram of the database design as you have it after making any adjustments given the new information you now have. If your design doesn't need to be changed from what you had then simply use that existing design, but chances are there will be some adjustments. You can simply export your Draw.IO as a .png image file, and then insert that image into your word document.a. This diagram should incorporate everything you know about the company thus far and show as many tables as you believe needed given the information at your disposal to-date.b. For each table list the attributes (columns) you believe will be required.c. You will also need to identify the connecting points between tables. And here you need to be thinking in terms of the foreign key relational constraints—the proper relationships between tables.d. Finally, you will need to identify the primary key for each table.2. Implement your design using Microsoft SQL Server Management Studio (SSMS). You will need all the following:a. An AWS RDS SQL Server Service. You should already have created this. Note, you do not want to have multiple services. One is enough and can hold multiple databases.b. A Database named NI or NationalInvestments (or something unique to this project)c. Within your database create each of the tables shown in your diagram.d. For each table create all the necessary columns with appropriate data-types.e. Identify the primary key for each table.f. Create the relationships between the tables as need and as specified by your design.3. Create a new database diagram using Database Diagrams feature in SSMS.a. Place each of the tables you have created onto the SSMS diagram.b. Change the view to use the Standard option from the Table View menu. This will show not only the column names but also the datatypes.c. Copy the diagram to the Windows clipboard and paste to your Word document.Criteria:
Much of your work in this assignment is that of refining your design according to the new information provided, determining the data-types for the columns within each table, and implementing this design in SSMS.
Submission:
You will submit a single document in either Word of PDF format to Blackboard. This document will be your Progress Report to the partners at National Investments.
Important: You might want to go back and read the section on "Reports" from Introduction to Professional Communications. (Link to reports information here.) Focus on the information about the "Progress Report" and "Report Organization." Note, with respect to the "Report Organization" section you only need to focus on the information about the "Introduction," "Body," and "Conclusion."
UMUC Create a Populate a Table Worksheet
Create a unique table of your choice using Oracle SQL*PLUS.The table should have at least 4 columns and 1 primary key.Inse ...
UMUC Create a Populate a Table Worksheet
Create a unique table of your choice using Oracle SQL*PLUS.The table should have at least 4 columns and 1 primary key.Insert 4 records into the table.Share your SQL script file and results from running your script.
4 pages
Android Interactive User Interfaces
Android resources can be used to make interactive User Interfaces (UI) without having to hard code specific functionalitie ...
Android Interactive User Interfaces
Android resources can be used to make interactive User Interfaces (UI) without having to hard code specific functionalities and features. This ...
Week 7 - Simple Regression Analysis - MUST KNOW and USE SPSS to Complete this Assignment
Details:The purpose of this assignment is to apply simple regression concepts, interpret simple regression analysis models ...
Week 7 - Simple Regression Analysis - MUST KNOW and USE SPSS to Complete this Assignment
Details:The purpose of this assignment is to apply simple regression concepts, interpret simple regression analysis models, and justify business predictions based upon the analysis.For this assignment, you will use the "Trucks" dataset. You will use SPSS to analyze the dataset and address the questions presented. Findings should be presented in a Word document along with the SPSS outputs.The business characteristics of n = 250 U.S. trucking and delivery companies for calendar year 2011 were recorded. Among the characteristics studied were the number of drivers and the number of trucks (power units) each company employed.Part 1:Given that the data consists of counts and range of counts is large, a natural log transformation is usually performed to improve the linear model results. Apply a natural log transform to both variables and then plot the Y = log(Trucks) vs. X = log(Drivers).Is there a linear relationship? Justify your answer by providing the SPSS output as an illustration.Part 2:Build a simple linear model by regressing Y on X and testing whether or not a relationship exists between the number of drivers and the number of trucks. Address the following questions in your written response:After fitting the model, plot the standardized residuals (on vertical axis) vs. the standardize predictions (on horizontal axis). Is there a pattern? How would you interpret the pattern or lack of pattern?After fitting the model, derive the normal probability plot and interpret what the plot means.What is the coefficient of determination, R2, of the model? How would you interpret the R2?What is the estimate of β1? How would you interpret the estimate of β1?Is the estimate of β1 significantly different than 0? Assume an α = 0.01.What is a 95% confidence interval for β1? How would you interpret the 95% confidence interval for β1?If a new trucking and delivery company with 4,900 drivers were to be formed, how many trucks would you expect the company would employ based on the model?APA format is not required, but solid academic writing is expected.Please answer ALL Parts and Questions in great detail. Thank you!
UCLA Combining SAS Data Sets Creating and Maintaining Permanent Formats Coding Task
Using SAS, to get three files for the whole assignment.one program file, one output file, and one log file for the entire ...
UCLA Combining SAS Data Sets Creating and Maintaining Permanent Formats Coding Task
Using SAS, to get three files for the whole assignment.one program file, one output file, and one log file for the entire assignment.three questions see the file for more information.1. Handling Same-Named Variables and Different Data Types for BY VariablesThe data set orion.web_products2 contains an observation for every product availablefor sale on Orion Star’s wholesale website.Partial orion.web_products2 (20 Total Observations) Product_ID Price Name 120400304333 114.36 Smasher Super Rq Ti 350 Tennis Racket 120400305288 53.26 Knife 120400305846 107.74 Big Guy Men's Air Deschutz Viii Shoes 120400308766 40.96 Big Guy Men's Packable Hiking Shorts 120400308849 12.23 Wood Box for 6 BallsThe data set orion.web_orders2 contains a list of orders made in a single day from thewebsite. Each observation contains the product ID, the quantity ordered, and the customer’sname.Partial orion.web_orders2 (43 Total Observations) Product_ID Quantity Name 120400305288 16 Carglar Aydemir 120400305288 19 Sanelisiwe Collier 120400305846 13 Candy Kinsey 120400305846 13 Cynthia Martinez 120400305846 10 Rolf Robak The two data sets are sorted by Product_ID. Product_ID is a numeric variable in orion.web_products2 and a character variable with a length of 12 in orion.web_orders2.a. Create a new data set, web_converted, from the orion.web_products2 data set. Change the type of Product_ID to character. (Use the data set web_converted to merge with orion.web_orders2 in the next step.)Hint: Use the RENAME= data set option to change Product_ID to some other name, such as nProduct_ID, the LENGTH statement to declare a new character variable named Product_ID, and an assignment statement with a PUT function to explicitly convert the numeric value in nProduct_ID into a character value in Product_ID.b. Create three new data sets:A data set named revenue contains the product code, the price, the quantity sold, the product name, the customer name and the revenue generated from each sale. Revenue is calculated as Price*Quantity. The Name variable in web_converted refers to the product name and the Name variable in web_orders2 refers to the customer name. Give each variable an appropriate name in the revenue data set.A data set named notsold contains the product code, price, and product name for each product that was not sold.A data set named invalidcode contains the product code, quantity, and customer name for each observation in the web_orders2 data set that does not have a corresponding product code in the web_products2 data set.c. Print the three data sets with appropriate titles. The data sets should contain 39, 7, and 4 observations, respectively. (The data sets you create might have different variable namesthan the ones shown here.)Partial work.revenue (39 Observations)
Java Question
So here is the basis of my code, I need help with inputting the correct code which will allow me to create a class that wr ...
Java Question
So here is the basis of my code, I need help with inputting the correct code which will allow me to create a class that writes employee payroll records to a file and a class that checks that the records have been written. please help!import java.util.Scanner;public class EmployeePayroll { //STUDENTS INSERT LINE COMMENTS FOR EACH VARIABLE. private String employeeName = ""; private int hoursWorked = 0; private double payRate = 0.0; private double grossPay = 0.0; private double retire401K = 0.0; private double percent401K = 0.0; private double grossPayTotal = 0.0; private double total401K = 0.0; private int firstNmLength = 0; private Scanner input = new Scanner(System.in); /** * STUDENTS ARE TO INSERT COMMENT BOXES FOR EACH METHOD. */ public EmployeePayroll() { }//STUDENTS ARE TO INSERT LINE COMMENTS FOR EACH CLOSE BRACE. public EmployeePayroll(String emplName, int hrsWrkd, double hourlyPay, double retirementPercent) { setEmployeeName(emplName); setHoursWorked(hrsWrkd); setPayRate(hourlyPay); set401K(retirementPercent); } public final void setEmployeeName(String employeeName) { while(!isAlpha(employeeName)) { System.out.printf("%nEnter valid first name: "); employeeName = input.nextLine(); } this.employeeName = employeeName; } public void setEmployeeName(int i) { String first = "", last = ""; System.out.printf("%nEnter the %semployee\'s first name press enter then the last " + "name press enter: ", i == 0 ? "" : "next "); first = input.nextLine(); last = input.nextLine(); while(!isAlpha(first)) { System.out.printf("%nEnter valid first name: "); first = input.nextLine(); } firstNmLength = first.length(); while(!isAlpha(last)) { System.out.printf("%nEnter valid last name: "); last = input.nextLine(); } employeeName = first + " " + last; } public final void setHoursWorked(int hoursWorked) { this.hoursWorked = hoursWorked; } public void setHoursWorked(String first) { System.out.printf("%nEnter the number of hours worked for %s: ", first); while(!input.hasNextInt()) { input.next(); System.out.printf("%nInvalid type! Re-enter the number of " + "hours worked for %s: ", first); } hoursWorked = input.nextInt(); while(hoursWorked > 40 || hoursWorked < 5) { hoursWorked = testHoursWorked(hoursWorked); } } public final void setPayRate(double payRate) { this.payRate = payRate; } public void setPayRate() { System.out.printf("%nEnter the employee\'s hourly pay rate: "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter the hourly pay rate: "); } payRate = input.nextDouble(); while(payRate < 7.25 || payRate > 26.00) { payRate = testPayRate(payRate); } } public void calcGrossPay() { grossPay = hoursWorked * payRate; } public final void set401K(double percent401K) { this.percent401K = percent401K; } public void set401K() { System.out.printf("%nEnter the employee\'s 401K contribution " + "as a percentage of salary (not to exceed 10%%): "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter the 401K contribution " + "not to exceed 10%% of salary: "); } percent401K = input.nextDouble(); while(percent401K > 10.00) { percent401K = test401K(); } } public void calcRetire401K() { retire401K = percent401K/100 * grossPay; } public String getEmployeeName() { return employeeName ; } public int getHoursWorked() { return hoursWorked; } public double getPayRate() { return payRate; } public double get401K() { return percent401K; } public double getGrossPay() { return grossPay; } public double getRetire401K() { return retire401K; } public int testHoursWorked(int hoursWorked) { if(hoursWorked > 40) { System.out.printf("%nHours worked cannot EXCEED 40. Please re-enter: "); } if(hoursWorked < 5) { System.out.printf("%nHours worked cannot be LESS than 5. Please re-enter: "); } while(!input.hasNextInt()) { input.next(); System.out.printf("%nInvalid type! Re-enter the number of hours " + "worked not less than 5 or greater than 40: "); } return input.nextInt(); } public double testPayRate(double payRate) { if(payRate < 7.25) { System.out.printf("%nHourly pay cannot be LESS than $7.25. Please re-enter: "); } if(payRate > 26) { System.out.printf("%nHourly pay cannot EXCEED $26.00. Please re-enter: "); } while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter an hourly pay rate that " + "is not less than $7.25 or greater than $26.00: "); } return input.nextDouble(); } public double test401K() { System.out.printf("%nContribution cannot EXCEED 10%%. Please re-enter: "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter a contribution " + "NOT exceeding 10%% of salary: "); } return input.nextDouble(); } public boolean isAlpha(String name) { return name != null && name.chars().allMatch(Character::isLetter); } }
Similar Content
University of Illinois at Chicago C Programming Questions
Assignment #1
This assignment covers learning objective 1: An understanding of basic data structures, including stacks,
q...
University of Manchester R Code Question
I need the right R code which can run in my computer. Please finish it as soon as possible.all the questions and data are ...
Why my favorite game is fun analysis
This week we talked about theories of what defines a game, what it means to play, and what it means to have fun. To add to...
c++ coding
Write a c++ program that contains the following functiona) A functions that takes in two arrays ( both can be of any size)...
little Homework with JSON file need help plzzzzzzzzzz
For this assignment, take the code you used to read in a text file and create an array of objects and convert it to read i...
ECT 424 DPU Wordpress Widgets & Plugins Configuring the Website with Plugins Capstone
Configure your site for the following:
a. Selected Plugins. Add at least three (but you may do as many as you like) from ...
Ans
5 swap 6. n * fact_re(n-1) 7.option a 8. option b 9. option d 42.option b 43. option b 44. PREV.NEXT = CURR.NEXT; 45. maxN...
Analysis Of Housing Locations In Ny And Fl
A good house location has to be chosen within the available locations of New York and Florida. The analysis is done based ...
Week 5 System Implementation And Maintenance
Verbania is a company planning a comeback to the IT industry by establishing a social network that should enable the users...
Related Tags
Book Guides
As I Lay Dying
by William Faulkner
The Silent Patient
by Alex Michaelides
Brave New World
by Aldous Huxley
A Wrinkle as Time
by Madeleine L'Engle
The Metamorphosis
by Franz Kafka
Uncle Tom's Cabin
by Harriet Beecher Stowe
The Atlantis Gene
by S. A. Beck
Extreme Ownership - How US Navy SEALs Lead and Win
by Jocko Willink and Leif Babin
The President is Missing
by James Patterson, Bill Clinton
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
CSCC Database Fundamentals Project
Use Draw.io***I attached Project 3 which I already did. I hope it gives you some reference***In your previous assignment y ...
CSCC Database Fundamentals Project
Use Draw.io***I attached Project 3 which I already did. I hope it gives you some reference***In your previous assignment you create a diagram for the new database. And you worked to understand the data as much as you could, but there were questions about what some of the data given you represents. In this case study we look at the meaning of the data that was given and you go back and refine your design again, but also begin developing the database in SQL Server.You asked several different employees (portfolio managers and client services representatives to walk you through the data provided) and you created a matrix of information (meta-data) about the data from the spreadsheets.Client List Information:
Client Id
The client id is provided to us through a brokerage company. We have no control over how this ID is created or what it looks like.
Client Name
We use the investor's name (for individual investment accounts) or the company name as the client name. Generally, we also add what kind of account this is "Pension," "401K," etc., to the end of the name.
Account Type
Currently we have four different account types:
P1 - Pension fund (pool #1).
P2 - Pension fund (pool #2).
I1 - Individual investor's fund.
K1 - 401K fund.
When we manage money from our individual client's we pool those funds into one of these four current accounts. We don't mix individual investor's money with pension funds, for example. The number of account types can change as the company grows.
AUM
This stands for Assets Under Management. And it represents the total current investment amount for each account. We add all AUMs together to know what the company's total AUM is.
Investor Contact
The is the name or names of the people who are either client or the client's representative(s). There can be multiple contacts for a single account. Generally, it is no more than two people, but there's nothing to say it can't be more than two.
Phone
This is the phone for the contact person.
Inception
This is the date that we started investing for this client.
Strategy
Each client chooses an investment strategy or strategies for their money. Currently, we have four investment strategies available to our clients:
LCV - Large Cap Value account
MCG - Mid Cap Growth account
QNT - Quant funds account
SCG - Small cap growth
A client can choose multiple investment strategies, but this means there will be multiple accounts for the same client. An example of this is the City of Ferguson Municipal 401K. They split their investment money between three different investment strategies.Each strategy has different risks and expected rates of return. With more risk comes more expectation that the investment will perform better.
C/S Representative
This is the person at National Investments who handles all client communication and reporting.
Investment Manager
This is the person at National Investments who is responsible for the investment decisions on behalf of the client. In reality, the investment manager is tied to the strategy—not to the client. For example, Peter Denning manages the Large Cap Value strategy, hence he is the manager for the three companies in the example data that have selected the LCV funds.
Holdings Report Information:
Ticker
This is the stock symbol for the equity that is being held in the account. For example, AMZN is the unique symbol for Amazon while MSFT is the unique symbol for Microsoft. These tickers (symbols) are defined by the exchange where the company's stocks are traded.
Name
The name of the company associated with the ticker.
Shares
This is the number of shares of stock owned by each investor.
Price
Each company's share price is determined by the market. We always record the latest share price from the market.
Current Value
This is the value of each investment and is determined as Shares X Price.
Additional Notes:You also recorded some additional notes in your interactions with various people, as follows:
Any investor can have multiple accounts at National Investments. Each account must be kept separate from the others.
In the Client List example data, there is a note about someone named Kevin Riley. In this case, Kevin is the investor contact, however, he does not work for the City of Ferguson. Frequently, an investor will hire an outside consultant who becomes the investment contact. The role of the consultant is to ensure that the investor's money is handled properly. These consultants typically perform audits for the investor and help guide the investor in their decision making.
As National Investments grows, it will have more clients and potentially more strategies and account types.
AUM is important because it is a measure both of the value of any individual account, and when added all together it is the total amount of money National Investments is managing.Purpose:You know feel that you have more information than you did before and can begin to rethink and possibly refine your initial database diagram. You can now also begin thinking about the actual implementation of your design.Task:In preparing your progress report you will need to perform all the following:1. A copy of your Draw.IO diagram of the database design as you have it after making any adjustments given the new information you now have. If your design doesn't need to be changed from what you had then simply use that existing design, but chances are there will be some adjustments. You can simply export your Draw.IO as a .png image file, and then insert that image into your word document.a. This diagram should incorporate everything you know about the company thus far and show as many tables as you believe needed given the information at your disposal to-date.b. For each table list the attributes (columns) you believe will be required.c. You will also need to identify the connecting points between tables. And here you need to be thinking in terms of the foreign key relational constraints—the proper relationships between tables.d. Finally, you will need to identify the primary key for each table.2. Implement your design using Microsoft SQL Server Management Studio (SSMS). You will need all the following:a. An AWS RDS SQL Server Service. You should already have created this. Note, you do not want to have multiple services. One is enough and can hold multiple databases.b. A Database named NI or NationalInvestments (or something unique to this project)c. Within your database create each of the tables shown in your diagram.d. For each table create all the necessary columns with appropriate data-types.e. Identify the primary key for each table.f. Create the relationships between the tables as need and as specified by your design.3. Create a new database diagram using Database Diagrams feature in SSMS.a. Place each of the tables you have created onto the SSMS diagram.b. Change the view to use the Standard option from the Table View menu. This will show not only the column names but also the datatypes.c. Copy the diagram to the Windows clipboard and paste to your Word document.Criteria:
Much of your work in this assignment is that of refining your design according to the new information provided, determining the data-types for the columns within each table, and implementing this design in SSMS.
Submission:
You will submit a single document in either Word of PDF format to Blackboard. This document will be your Progress Report to the partners at National Investments.
Important: You might want to go back and read the section on "Reports" from Introduction to Professional Communications. (Link to reports information here.) Focus on the information about the "Progress Report" and "Report Organization." Note, with respect to the "Report Organization" section you only need to focus on the information about the "Introduction," "Body," and "Conclusion."
UMUC Create a Populate a Table Worksheet
Create a unique table of your choice using Oracle SQL*PLUS.The table should have at least 4 columns and 1 primary key.Inse ...
UMUC Create a Populate a Table Worksheet
Create a unique table of your choice using Oracle SQL*PLUS.The table should have at least 4 columns and 1 primary key.Insert 4 records into the table.Share your SQL script file and results from running your script.
4 pages
Android Interactive User Interfaces
Android resources can be used to make interactive User Interfaces (UI) without having to hard code specific functionalitie ...
Android Interactive User Interfaces
Android resources can be used to make interactive User Interfaces (UI) without having to hard code specific functionalities and features. This ...
Week 7 - Simple Regression Analysis - MUST KNOW and USE SPSS to Complete this Assignment
Details:The purpose of this assignment is to apply simple regression concepts, interpret simple regression analysis models ...
Week 7 - Simple Regression Analysis - MUST KNOW and USE SPSS to Complete this Assignment
Details:The purpose of this assignment is to apply simple regression concepts, interpret simple regression analysis models, and justify business predictions based upon the analysis.For this assignment, you will use the "Trucks" dataset. You will use SPSS to analyze the dataset and address the questions presented. Findings should be presented in a Word document along with the SPSS outputs.The business characteristics of n = 250 U.S. trucking and delivery companies for calendar year 2011 were recorded. Among the characteristics studied were the number of drivers and the number of trucks (power units) each company employed.Part 1:Given that the data consists of counts and range of counts is large, a natural log transformation is usually performed to improve the linear model results. Apply a natural log transform to both variables and then plot the Y = log(Trucks) vs. X = log(Drivers).Is there a linear relationship? Justify your answer by providing the SPSS output as an illustration.Part 2:Build a simple linear model by regressing Y on X and testing whether or not a relationship exists between the number of drivers and the number of trucks. Address the following questions in your written response:After fitting the model, plot the standardized residuals (on vertical axis) vs. the standardize predictions (on horizontal axis). Is there a pattern? How would you interpret the pattern or lack of pattern?After fitting the model, derive the normal probability plot and interpret what the plot means.What is the coefficient of determination, R2, of the model? How would you interpret the R2?What is the estimate of β1? How would you interpret the estimate of β1?Is the estimate of β1 significantly different than 0? Assume an α = 0.01.What is a 95% confidence interval for β1? How would you interpret the 95% confidence interval for β1?If a new trucking and delivery company with 4,900 drivers were to be formed, how many trucks would you expect the company would employ based on the model?APA format is not required, but solid academic writing is expected.Please answer ALL Parts and Questions in great detail. Thank you!
UCLA Combining SAS Data Sets Creating and Maintaining Permanent Formats Coding Task
Using SAS, to get three files for the whole assignment.one program file, one output file, and one log file for the entire ...
UCLA Combining SAS Data Sets Creating and Maintaining Permanent Formats Coding Task
Using SAS, to get three files for the whole assignment.one program file, one output file, and one log file for the entire assignment.three questions see the file for more information.1. Handling Same-Named Variables and Different Data Types for BY VariablesThe data set orion.web_products2 contains an observation for every product availablefor sale on Orion Star’s wholesale website.Partial orion.web_products2 (20 Total Observations) Product_ID Price Name 120400304333 114.36 Smasher Super Rq Ti 350 Tennis Racket 120400305288 53.26 Knife 120400305846 107.74 Big Guy Men's Air Deschutz Viii Shoes 120400308766 40.96 Big Guy Men's Packable Hiking Shorts 120400308849 12.23 Wood Box for 6 BallsThe data set orion.web_orders2 contains a list of orders made in a single day from thewebsite. Each observation contains the product ID, the quantity ordered, and the customer’sname.Partial orion.web_orders2 (43 Total Observations) Product_ID Quantity Name 120400305288 16 Carglar Aydemir 120400305288 19 Sanelisiwe Collier 120400305846 13 Candy Kinsey 120400305846 13 Cynthia Martinez 120400305846 10 Rolf Robak The two data sets are sorted by Product_ID. Product_ID is a numeric variable in orion.web_products2 and a character variable with a length of 12 in orion.web_orders2.a. Create a new data set, web_converted, from the orion.web_products2 data set. Change the type of Product_ID to character. (Use the data set web_converted to merge with orion.web_orders2 in the next step.)Hint: Use the RENAME= data set option to change Product_ID to some other name, such as nProduct_ID, the LENGTH statement to declare a new character variable named Product_ID, and an assignment statement with a PUT function to explicitly convert the numeric value in nProduct_ID into a character value in Product_ID.b. Create three new data sets:A data set named revenue contains the product code, the price, the quantity sold, the product name, the customer name and the revenue generated from each sale. Revenue is calculated as Price*Quantity. The Name variable in web_converted refers to the product name and the Name variable in web_orders2 refers to the customer name. Give each variable an appropriate name in the revenue data set.A data set named notsold contains the product code, price, and product name for each product that was not sold.A data set named invalidcode contains the product code, quantity, and customer name for each observation in the web_orders2 data set that does not have a corresponding product code in the web_products2 data set.c. Print the three data sets with appropriate titles. The data sets should contain 39, 7, and 4 observations, respectively. (The data sets you create might have different variable namesthan the ones shown here.)Partial work.revenue (39 Observations)
Java Question
So here is the basis of my code, I need help with inputting the correct code which will allow me to create a class that wr ...
Java Question
So here is the basis of my code, I need help with inputting the correct code which will allow me to create a class that writes employee payroll records to a file and a class that checks that the records have been written. please help!import java.util.Scanner;public class EmployeePayroll { //STUDENTS INSERT LINE COMMENTS FOR EACH VARIABLE. private String employeeName = ""; private int hoursWorked = 0; private double payRate = 0.0; private double grossPay = 0.0; private double retire401K = 0.0; private double percent401K = 0.0; private double grossPayTotal = 0.0; private double total401K = 0.0; private int firstNmLength = 0; private Scanner input = new Scanner(System.in); /** * STUDENTS ARE TO INSERT COMMENT BOXES FOR EACH METHOD. */ public EmployeePayroll() { }//STUDENTS ARE TO INSERT LINE COMMENTS FOR EACH CLOSE BRACE. public EmployeePayroll(String emplName, int hrsWrkd, double hourlyPay, double retirementPercent) { setEmployeeName(emplName); setHoursWorked(hrsWrkd); setPayRate(hourlyPay); set401K(retirementPercent); } public final void setEmployeeName(String employeeName) { while(!isAlpha(employeeName)) { System.out.printf("%nEnter valid first name: "); employeeName = input.nextLine(); } this.employeeName = employeeName; } public void setEmployeeName(int i) { String first = "", last = ""; System.out.printf("%nEnter the %semployee\'s first name press enter then the last " + "name press enter: ", i == 0 ? "" : "next "); first = input.nextLine(); last = input.nextLine(); while(!isAlpha(first)) { System.out.printf("%nEnter valid first name: "); first = input.nextLine(); } firstNmLength = first.length(); while(!isAlpha(last)) { System.out.printf("%nEnter valid last name: "); last = input.nextLine(); } employeeName = first + " " + last; } public final void setHoursWorked(int hoursWorked) { this.hoursWorked = hoursWorked; } public void setHoursWorked(String first) { System.out.printf("%nEnter the number of hours worked for %s: ", first); while(!input.hasNextInt()) { input.next(); System.out.printf("%nInvalid type! Re-enter the number of " + "hours worked for %s: ", first); } hoursWorked = input.nextInt(); while(hoursWorked > 40 || hoursWorked < 5) { hoursWorked = testHoursWorked(hoursWorked); } } public final void setPayRate(double payRate) { this.payRate = payRate; } public void setPayRate() { System.out.printf("%nEnter the employee\'s hourly pay rate: "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter the hourly pay rate: "); } payRate = input.nextDouble(); while(payRate < 7.25 || payRate > 26.00) { payRate = testPayRate(payRate); } } public void calcGrossPay() { grossPay = hoursWorked * payRate; } public final void set401K(double percent401K) { this.percent401K = percent401K; } public void set401K() { System.out.printf("%nEnter the employee\'s 401K contribution " + "as a percentage of salary (not to exceed 10%%): "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter the 401K contribution " + "not to exceed 10%% of salary: "); } percent401K = input.nextDouble(); while(percent401K > 10.00) { percent401K = test401K(); } } public void calcRetire401K() { retire401K = percent401K/100 * grossPay; } public String getEmployeeName() { return employeeName ; } public int getHoursWorked() { return hoursWorked; } public double getPayRate() { return payRate; } public double get401K() { return percent401K; } public double getGrossPay() { return grossPay; } public double getRetire401K() { return retire401K; } public int testHoursWorked(int hoursWorked) { if(hoursWorked > 40) { System.out.printf("%nHours worked cannot EXCEED 40. Please re-enter: "); } if(hoursWorked < 5) { System.out.printf("%nHours worked cannot be LESS than 5. Please re-enter: "); } while(!input.hasNextInt()) { input.next(); System.out.printf("%nInvalid type! Re-enter the number of hours " + "worked not less than 5 or greater than 40: "); } return input.nextInt(); } public double testPayRate(double payRate) { if(payRate < 7.25) { System.out.printf("%nHourly pay cannot be LESS than $7.25. Please re-enter: "); } if(payRate > 26) { System.out.printf("%nHourly pay cannot EXCEED $26.00. Please re-enter: "); } while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter an hourly pay rate that " + "is not less than $7.25 or greater than $26.00: "); } return input.nextDouble(); } public double test401K() { System.out.printf("%nContribution cannot EXCEED 10%%. Please re-enter: "); while(!input.hasNextDouble()) { input.next(); System.out.printf("%nInvalid type! Re-enter a contribution " + "NOT exceeding 10%% of salary: "); } return input.nextDouble(); } public boolean isAlpha(String name) { return name != null && name.chars().allMatch(Character::isLetter); } }
Earn money selling
your Study Documents