Questions
Required: Use the following information to complete Armando and Lourdes Gonzales’s 2016 federal income tax return....

Required:

Use the following information to complete Armando and Lourdes Gonzales’s 2016 federal income tax return. If information is missing, use reasonable assumptions to fill in the gaps.

You may need the following forms and schedules to complete the project: Form 1040, Schedule A, Schedule B, Schedule C, Schedule D, Schedule E, Schedule SE, Form 2106-EZ, Form 4562 (for the dental practice), Form 4562 (for the rental property), Form 4797, Form 8863, Form 8949.

Facts:

Armando Z. and Lourdes K. Gonzales are married and file a joint return. Armando is self-employed as a dentist, and Lourdes is a college professor. Armando and Lourdes have three children. The oldest is Ricardo, who lives at home. Ricardo is a law student at the University of Cincinnati and worked part time during the year, earning $1,500, which he spent for his own support. Armando and Lourdes provided $6,000 toward Ricardo’s support (including $4,000 for Ricardo’s fall tuition). They also provided over half the support of their daughter, Selena, who is a full-time student at Edgecliff College in Cincinnati. Selena worked part time as an independent contractor during the year, earning $3,200. Selena lived at home until she was married in December 2016. She filed a joint return with her husband, Tony, who earned $20,000 during the year. Felipe is the youngest and lived in the Gonzales’s home for the entire year. The Gonzaleses provide you with the following additional information:

Armando and Lourdes would like to take advantage on their return of any educational expenses paid for their children.

The Gonzaleses do not want to contribute to the presidential election campaign.

The Gonzaleses live at 621 Franklin Avenue, Cincinnati, Ohio 45211.

Armando’s birthday is 3/5/1958 and his Social Security number is 333-45-6666.

Lourdes’s birthday is 4/24/1961 and her Social Security number is 566-77-8888.

Ricardo’s birthday is 11/6/1993 and his Social Security number is 576-18-7928.

Selena’s birthday is 2/1/1997 and her Social Security number is 575-92-4321.

Felipe’s birthday is 12/12/2004 and his Social Security number is 613-97-8465.

The Gonzaleses do not have any foreign bank accounts or trusts.

Lourdes is a lecturer at Xavier University in Cincinnati, where she earned $30,000. The university withheld federal income tax of $3,375, state income tax of $900, Cincinnati city income tax of $375, $1,860 of Social Security tax, and $435 of Medicare tax. She also worked part of the year for Delta Airlines. Delta paid her $10,000 in salary, and withheld federal income tax of $1,125, state income tax of $300, Cincinnati city income tax of $125, Social Security tax of $620, and Medicare tax of $145.

The Gonzaleses received $800 of interest from State Savings Bank on a joint account. They received interest of $1,000 on City of Cincinnati bonds they bought in January with the proceeds of a loan from Third National Bank of Cincinnati. They paid interest of $1,100 on the loan. Armando received a dividend of $540 on General Bicycle Corporation stock he owns. Lourdes received a dividend of $390 on Acme Clothing Corporation stock she owns. Armando and Lourdes received a dividend of $865 on jointly owned stock in Maple Company. All of the dividends received in 2016 are qualified dividends.

Armando practices under the name “Armando Z. Gonzales, DDS.” His business is located at 645 West Avenue, Cincinnati, Ohio 45211, and his employer identification number is 01-2222222. Armando’s gross receipts during the year were $111,000. Armando uses the cash method of accounting for his business. Armando’s business expenses are as follows:

Advertising                                                                                                                         $ 1,200

Professional dues                                                                                                                  490

Professional journals                                                                                                             360

Contributions to employee benefit plans                                                                  2,000

Malpractice insurance                                                                                                        3,200

Fine for overbilling State of Ohio for work performed on welfare patient                  5,000

Insurance on office contents                                                                                             720

Interest on money borrowed to refurbish office                                                                      600

Accounting services                                                                                                           2,100

Miscellaneous office expense                                                                                           388

Office rent                                                                                                                           12,000

Dental supplies                                                                                                                     7,672

Utilities and telephone                                                                                                      3,360

Wages                                                                                                                                  30,000

Payroll taxes                                                                                                                          2,400

In June, Armando decided to refurbish his office. This project was completed and the assets placed in service on July 1. Armando’s expenditures included $8,000 for new office furniture, $6,000 for new dental equipment (seven-year recovery period), and $2,000 for a new computer. Armando elected to compute his cost recovery allowance using MACRS. He did not elect to use §179 immediate expensing, and he chose to not claim any bonus depreciation.

Lourdes’s mother, Maria, died on July 2, 2011, leaving Lourdes her entire estate. Included in the estate was Maria’s residence (325 Oak Street, Cincinnati, Ohio 45211). Maria’s basis in the residence was $30,000. The fair market value of the residence on July 2, 2011, was $155,000. The property was distributed to Lourdes on January 1, 2012. The Gonzaleses have held the property as rental property and have managed it themselves. From 2012 until June 30, 2016, they rented the house to the same tenant. The tenant was transferred to a branch office in California and moved out at the end of June. Since they did not want to bother finding a new tenant, Armando and Lourdes sold the house on June 30, 2016. They received $140,000 for the house and land ($15,000 for the land and $125,000 for the house), less a 6 percent commission charged by the broker. They had depreciated the house using the MACRS rules and conventions applicable to residential real estate. To compute depreciation on the house, the Gonzaleses had allocated $15,000 of the property’s basis to the land on which the house is located. The Gonzaleses collected rent of $1,000 a month during the six months the house was occupied during the year. They incurred the following related expenses during this period:

Property insurance                                         $500

Property taxes                                                   800

Maintenance                                                     465

Depreciation (to be computed)                       ?

The Gonzaleses sold 200 shares of Capp Corporation stock on September 3, 2016, for $42 a share (minus a $50 commission). The Gonzaleses received the stock from Armando’s father on June 25, 1980, as a wedding present. Armando’s father originally purchased the stock for $10 per share on January 1, 1968. The stock was valued at $14.50 per share on the date of the gift. No gift tax was paid on the gift.

Lourdes is required by Xavier University to visit several high schools in the Cincinnati area to evaluate Xavier University students who are doing their practice teaching. However, she is not reimbursed for the expenses she incurs in doing this. During the spring semester (January through April 2016), she drove her personal automobile 6,800 miles in fulfilling this obligation. Lourdes drove an additional 6,700 personal miles during 2016. She has been using the car since June 30, 2015. Lourdes uses the standard mileage method to calculate her car expenses.

Armando and Lourdes have given you a file containing the following receipts for expenditures during the year:

Prescription medicine and drugs (net of insurance reimbursement)                         $   376

Doctor and hospital bills (net of insurance reimbursement)                                          2,468

Penalty for underpayment of last year’s state income tax                                                   15

Real estate taxes on personal residence                                                                                                4,762

Interest on home mortgage (paid to Home State Savings & Loan)                             8,250

Interest on credit cards (consumer purchases)                                                                        595

Cash contribution to St. Matthew’s church                                                                           3,080

Payroll deductions for Lourdes’s contributions to the United Way                                  150

Professional dues (Lourdes)                                                                                                            325

Professional subscriptions (Lourdes)                                                                                            245

Fee for preparation of 2015 tax return paid April 12, 2016                                                   500

The Gonzaleses filed their 2015 federal, state, and local returns on April 12, 2016. They paid the following additional 2015 taxes with their returns: federal income taxes of $630, state income taxes of $250, and city income taxes of $75.

The Gonzaleses made timely estimated federal income tax payments of $1,500 each quarter during 2016. They also made estimated state income tax payments of $300 each quarter and estimated city income tax payments of $160 each quarter. The Gonzaleses made all fourth-quarter payments on December 31, 2016. They would like to receive a refund for any overpayments.

Armando and Lourdes have qualifying insurance for purposes of the Affordable Care Act (ACA).

In: Accounting

Below are four bivariate data sets and the scatter plot for each. (Note that each scatter...

Below are four bivariate data sets and the scatter plot for each. (Note that each scatter plot is displayed on the same scale.) Each data set is made up of sample values drawn from a population.

x y
1.0 10.0
2.0 9.0
3.0 8.0
4.0 7.0
5.0 6.0
6.0 5.0
7.0 4.0
8.0 3.0
9.0 2.0
10.0 1.0

x

1

2

3

4

5

6

7

8

9

10

11

y

1

2

3

4

5

6

7

8

9

10

11

0

Figure 1
            
u v
1.0 7.3
2.0 9.1
3.0 7.2
4.0 5.3
5.0 8.0
6.0 5.2
7.0 4.2
8.0 7.1
9.0 6.2
10.0 3.6

u

1

2

3

4

5

6

7

8

9

10

11

v

1

2

3

4

5

6

7

8

9

10

11

0

Figure 2
w t
1.0 2.5
2.0 4.3
3.0 3.6
4.0 5.3
5.0 4.5
6.0 7.1
7.0 5.9
8.0 7.6
9.0 6.9
10.0 8.1

w

1

2

3

4

5

6

7

8

9

10

11

t

1

2

3

4

5

6

7

8

9

10

11

0

Figure 3
            
m n
1.0 3.8
2.0 6.7
3.0 8.0
4.0 8.8
5.0 9.6
6.0 9.8
7.0 9.0
8.0 8.0
9.0 6.7
10.0 4.0

m

1

2

3

4

5

6

7

8

9

10

11

n

1

2

3

4

5

6

7

8

9

10

11

0

Figure 4

Answer the following questions. The same response may be the correct answer for more than one question.

1. Which data set indicates the strongest negative linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data set
2. In which data set is there evidence of a strong nonlinear relationship between the two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets
3. Which data set indicates a perfect positive linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets
4. Which data set has an apparent positive, but not perfect, linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets

In: Statistics and Probability

Data Analysis & Visualization Topic R vector and save the r code in a text file...

Data Analysis & Visualization
Topic R vector and save the r code in a text file

Problem 1.
Create two vectors named v and w with the following contents:

     v : 21,10,32,2,-3,4,5,6,7,4,-22

     w : -18,72,11,-9,10,2,34,-5,18,9,2

A) Print the length of the vectors

B) Print all elements of the vectors

C) Print elements at indices 3 through 7.

D) Print the sum of the elements in each vector.

E) Find the mean of each vector. (Use R's mean() function)

F) Sort the vectors in descending order and then print.

G) Add vectors v and w.

H) Multiply vectors v and w.

I) In vector v select all elements that are greater than zero.

J) In vector w select all elements that are less than zero.

K) Multiply each element of vector v by 6. And then print.

L) Find maximum and minimum of each vector.

M) In each vector, replace all negative values with the average of all numbers in the vector.

Problem 2.

Write a for loop to print the numbers 100, 98, 96, . . . , 4, 2.

Problem 3.
Create a data frame with the following content:

city

county

state

population

Chicago

Cook

IL

2853114

Kenosha

Kenosha

WI

90352

Aurora

Kane

IL

171782

Elgin

Kane

IL

94487

Gary

Lake(IN)

IN

102746

Joliet

Kendall

IL

106221

Naperville

DuPage

IL

147779

Arlington Heights

Cook

IL

76031

Bolingbrook

Will

IL

70834

Cicero

Cook

IL

72616

Evanston

Cook

IL

74239

Hammond

Lake(IN)

IN

83048

Palatine

Cook

IL

67232

Schaumburg

Cook

IL

75386

Skokie

Cook

IL

63348

Waukegan

Lake(IL)

IL

91452


Hint: Create vectors for each column and then create a data frame using vectors and the data.frame() function. A sample is given in the lecture notes.

city<- c("Chicago","Kenosha","Aurora","Elgin","Gary","Joliet","Naperville","Arlington Heights","Bolingbrook","Cicero","Evanston","Hammond","Palatine","Schaumburg","Skokie","Waukegan")


county<- c( "Cook", "Kenosha", "Kane", "Kane", "Lake(IN)", "Kendall", "DuPage", "Cook", "Will", "Cook", "Cook", "Lake(IN)", "Cook", "Cook", "Cook", "Lake(IL)")

state<- c( "IL", "WI", "IL", "IL", "IN", "IL", "IL", "IL", "IL", "IL", "IL", "IN", "IL", "IL", "IL", "IL")

population<-c(2853114,90352,171782,94487,102746,106221,147779,76031,70834,72616,74239,83048,67232,75386,63348,91452)

A) Print the mean of population.

B) Print the population of all cities greater than 800,000.

C) Print city, county,state and population of all cities with population less than 1,000,000.

D) Print city, county, state, and population of the most crowded city.

Hint: You can use subset() function with max() in your selection criteria in the subset() function.Then print the data in the subset.

E) Print the city and state of the least crowded city.

Hint: You can use subset() function with min() in your selection criteria in the subset() function. Then print the data in the subset.

In: Computer Science

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO? void readFile(Candidate candidates[]) –...

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO?

void readFile(Candidate candidates[]) – reads the elections.txt file, fills the candidates[] array. Hint: use substr() and find() functions. Set Score to 0.


void List(Candidate candidates[]) – prints the array of Candidate structs. One candidate per one line, include all fields. Use setw() to display nice looking list.


void displayCandidate(Candidate candidates[]) – prints the complete information about the candidate

.
Candidate First(Candidate candidates[]) – returns single struct element: candidate with highest score


Candidate Last(Candidate candidates[]) – returns single struct element: candidate with lowest score


void Votes(Candidate candidates[]) – function sorts the candidates[] array by number of votes, the order in candidates[] array is replaced


void Scores(Candidate candidates[]) – calculates the percentage score for each candidate. Use the following formula: ??????=(CandidateVotes)/(sum of votes)*100%

Correct line for the reference: F=John,L=Smith,V=3342

The line errors that your program needs to detect, are as follows:

incorrect token / separator, example in line 5: F=Steven,L=JohnV=4429 --- (comma missing) – lines with this error need to be ignored

space in token, example in line 3: F=Hillary,X=Clinton, V=1622 --- lines with this error need to be read, error fixed, data included in your dataset

empty line, example in line 6 – empty lines need to be ignored

Example Textfile

F=Michael,L=John,V=3342

F=Danny,L=Red,V=2003

F=Hillary,L=Clinton, V=1588

F=Albert,L=Lee,V=5332

F=Steven,L=JohnV=4429

*IMPORTANT* How would I do the readFile function? It says to check if the commas are present, and that the program will correct the line if there is white spaces. How do i use the find() function? Please be DETAILED in explanations of each part of code. Beginner Coder. *IMPORTANT*

Code Skeleton We HAVE to follow:

#include

#include

#include

#include

#include

using namespace std;

struct Candidate {
string Fname;
string Lname;
int votes;
double Score;
};

const int MAX_SIZE = 100;

void readFile(Candidate[]);

void List(Candidate[]);

void Votes(Candidate[]);

void displayCandidate(Candidate);

Candidate First(Candidate[]);

Candidate Last(Candidate[]);

void Scores(Candidate[]);

int main() {

}

void readFile(Candidate candidates[]) {

string line;

ifstream infile;

infile.open("elections.txt");

while (!infile.eof()) {

getline(infile,line);

// your code here

}

infile.close();

}

void List(Candidate candidates[]) {

}

void Votes(Candidate candidates[]) {

}

void displayCandidate(Candidate candidates) {

}

Candidate First(Candidate candidates[]) {

}

Candidate Last(Candidate candidates[]) {

}

void Scores(Candidate candidates[]) {

}

TO ANUNAGA: I don't know what you want, this is the code we HAVE TO go by and code by and figure out. I can't give you anymore information. Please, either help me solve this or just don't.

In: Computer Science

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. PLEASE READ CAREFULLY. alot of people give...

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. PLEASE READ CAREFULLY.

alot of people give me either partial answers, or incorrect skeleton. PLEASE YOU CAN'T CHANGE WHAT IS THERE, YOU CAN ONLY ADD.

void readFile(Candidate candidates[]) – reads the elections.txt file, fills the candidates[] array. Hint: use substr() and find() functions. Set Score to 0.


void List(Candidate candidates[]) – prints the array of Candidate structs. One candidate per one line, include all fields. Use setw() to display nice looking list.


void displayCandidate(Candidate candidates[]) – prints the complete information about the candidate

.
Candidate First(Candidate candidates[]) – returns single struct element: candidate with highest score


Candidate Last(Candidate candidates[]) – returns single struct element: candidate with lowest score


void Votes(Candidate candidates[]) – function sorts the candidates[] array by number of votes, the order in candidates[] array is replaced


void Scores(Candidate candidates[]) – calculates the percentage score for each candidate. Use the following formula: ??????=(CandidateVotes)/(sum of votes)*100%

Correct line for the reference: F=John,L=Smith,V=3342

The line errors that your program needs to detect, are as follows:

incorrect token / separator, example in line 5: F=Steven,L=JohnV=4429 --- (comma missing) – lines with this error need to be ignored

space in token, example in line 3: F=Hillary,X=Clinton, V=1622 --- lines with this error need to be read, error fixed, data included in your dataset

empty line, example in line 6 – empty lines need to be ignored

Example Textfile

F=Michael,L=John,V=3342

F=Danny,L=Red,V=2003

F=Hillary,L=Clinton, V=1588

F=Albert,L=Lee,V=5332

F=Steven,L=JohnV=4429

*IMPORTANT* Please be DETAILED in explanations of each part of code. Beginner Coder. *IMPORTANT*

Code Skeleton We ***HAVE*** to follow. How Would i go about using this skeleton? YOU CANNOT CHANGE FUNCTIONS OF VARIABLES, ***BUT YOU MAY ADD TO IT***. THE CODE MUST HAVE WHAT IS LISTED IN THE SKELETON CODE:

#include <iostream>

#include <iomanip>

#include <stdlib.h>

#include <fstream>

#include <string>

using namespace std;

struct Candidate {
string Fname;
string Lname;
int votes;
double Score;
};

const int MAX_SIZE = 100;

void readFile(Candidate[]);

void List(Candidate[]);

void Votes(Candidate[]);

void displayCandidate(Candidate);

Candidate First(Candidate[]);

Candidate Last(Candidate[]);

void Scores(Candidate[]);

int main() {

}

void readFile(Candidate candidates[]) {

string line;

ifstream infile;

infile.open("elections.txt");

while (!infile.eof()) {

getline(infile,line);

// your code here

}

infile.close();

}

void List(Candidate candidates[]) {

}

void Votes(Candidate candidates[]) {

}

void displayCandidate(Candidate candidates) {

}

Candidate First(Candidate candidates[]) {

}

Candidate Last(Candidate candidates[]) {

}

void Scores(Candidate candidates[]) {

}

In: Computer Science

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO? void readFile(Candidate candidates[]) –...

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO?

void readFile(Candidate candidates[]) – reads the elections.txt file, fills the candidates[] array. Hint: use substr() and find() functions. Set Score to 0.


void List(Candidate candidates[]) – prints the array of Candidate structs. One candidate per one line, include all fields. Use setw() to display nice looking list.


void displayCandidate(Candidate candidates[]) – prints the complete information about the candidate

.
Candidate First(Candidate candidates[]) – returns single struct element: candidate with highest score


Candidate Last(Candidate candidates[]) – returns single struct element: candidate with lowest score


void Votes(Candidate candidates[]) – function sorts the candidates[] array by number of votes, the order in candidates[] array is replaced


void Scores(Candidate candidates[]) – calculates the percentage score for each candidate. Use the following formula: ??????=(CandidateVotes)/(sum of votes)*100%

Correct line for the reference: F=John,L=Smith,V=3342

The line errors that your program needs to detect, are as follows:

incorrect token / separator, example in line 5: F=Steven,L=JohnV=4429 --- (comma missing) – lines with this error need to be ignored

space in token, example in line 3: F=Hillary,X=Clinton, V=1622 --- lines with this error need to be read, error fixed, data included in your dataset

empty line, example in line 6 – empty lines need to be ignored

Example Textfile

F=Michael,L=John,V=3342

F=Danny,L=Red,V=2003

F=Hillary,L=Clinton, V=1588

F=Albert,L=Lee,V=5332

F=Steven,L=JohnV=4429

*IMPORTANT* How would I do the readFile function? It says to check if the commas are present, and that the program will correct the line if there is white spaces. How do i use the find() function? Please be DETAILED in explanations of each part of code. Beginner Coder. *IMPORTANT*

Code Skeleton We HAVE to follow. How Would i go about using this skeleton? YOU CANNOT CHANGE FUNCTIONS OF VARIABLES, BUT YOU MAY ADD TO IT. THE CODE MUST HAVE WHAT IS LISTED IN THE SKELETON CODE:

#include <iostream>

#include <iomanip>

#include <stdlib.h>

#include <fstream>

#include <string>

using namespace std;

struct Candidate {
string Fname;
string Lname;
int votes;
double Score;
};

const int MAX_SIZE = 100;

void readFile(Candidate[]);

void List(Candidate[]);

void Votes(Candidate[]);

void displayCandidate(Candidate);

Candidate First(Candidate[]);

Candidate Last(Candidate[]);

void Scores(Candidate[]);

int main() {

}

void readFile(Candidate candidates[]) {

string line;

ifstream infile;

infile.open("elections.txt");

while (!infile.eof()) {

getline(infile,line);

// your code here

}

infile.close();

}

void List(Candidate candidates[]) {

}

void Votes(Candidate candidates[]) {

}

void displayCandidate(Candidate candidates) {

}

Candidate First(Candidate candidates[]) {

}

Candidate Last(Candidate candidates[]) {

}

void Scores(Candidate candidates[]) {

}

Also, how do i make verticle columbs for the display?

In: Computer Science

CASE INCIDENT What Should Wilma and Frank Do? Frank and Wilma Rogers live in the Toronto...

CASE INCIDENT

What Should Wilma and Frank Do?

Frank and Wilma Rogers live in the Toronto area. Frank is a product engineer in the automotive industry and Wilma is a professor for a local community college. Wilma has been working on her doctorate for the last five years and is scheduled to graduate with her PhD in Business

Administration shortly. Wilma has just received an interesting telephone call and can’t wait to talk to Frank about it.Over dinner that night Wilma tells Frank about the phone call: a past boss of hers called to tell her about an open position at a university in Nunavut. As Wilma excitedly discusses the associate professor of business position and the opportunities it will bring, Frank is thinking to himself what a great opportunity it is, but that he doesn’t find the location appealing. He subsequently tells her this and nothing more is discussed. A week goes by and Wilma still finds herself yearning to know more about this position and wanting to apply. She calls Frank and explains this to him and he encourages her to apply. Wilma calls her former boss and applies for the position. Eventually she gets an offer. Wilma gives her notice at the college and within the next six months starts her new position. Wilma moves to Nunavut, but Frank stays in Toronto until he can find a job in Nunavut. A few more months go by and Frank has not been able to find a comparable job, so he pressures Wilma to consider moving back to Toronto and leaving her new position. Wilma is torn about what to do as she loves her new job but understands why Frank is frustrated.

Questions

1.According to Edgar Schein, what career anchors are driving Wilma’s and Frank’s careers at this point?

2.If Wilma wishes to stay in her new job, how could her employer assist her with this dilemma?

3.Is there anything Frank and Wilma should have done differently in your opinion? If so, what?

In: Psychology

Your Tasks Step 1 Write the comments in the SnapCracklePop.java using the java doc style in...

Your Tasks

Step 1 Write the comments in the SnapCracklePop.java using the java doc style in zyBooks 3.8. See TODOa to TODOh.  

Step 2 Complete the class definition, variable declarations, constructor, and all the methods by reading the instructions in SnapCracklePop.java. See TODO1 to TODO7. (DONE I NEED HELP WITH STEP 1)

1 //TODOa complete this javadoc comment
2 /**
3 * [The class description]
4 * @author [Your Name]
5 * @version 1.0
6 */
7
8 //TODO1: declare the SnapCracklePop class
9 class SnapCracklePop{
10 //TODOb Complete Comments
11 /**
12 * [Instance Variable Descriptions]
13 */
14
15 //TODO2 Declare private instance variables
16 //to store Snap, Crackle, and Pop values
17 private int snap;
18 private int crackle;
19 private int pop;
20
21 //TODOc complete comments
22 /**
23 * [Constructor Description]
24 * @param [param name] [what the param represents]
25 * @param [param name] [what the param represents]
26 * @param [param name] [what the param represents]
27 */
28
29 /* The constructor takes in three ints,
30 * which must be assigned to their instance variables and initialized.
31 */
32
33 //TODO3 Write the constructor
34
35
36 //TODOe complete comments
37 /**
38 * [Method Description]
39 * @param [param name] [What the parameter represents]
40 * @return [What the method returns]
41 */
42 public SnapCracklePop(int snap, int crackle, int pop){
43 this.snap = snap;
44 this.crackle = crackle;
45 this.pop = pop;
46 }
47
48 /* playRound() is a helper method for playGame().
49 * It takes an int parameter representing the
50 * current round of play, and returns the
51 * String result for that specific round only.
52 */
53
54 //TODO4 implement the playRound method
55 String playRound(int round){
56 //set the string to empty
57 String output = "";
58 //if the current round number is multiple of snap
59 if(round % this.snap == 0){
60 output += "snap";
61 }
62 //if the current round number is multiple of crackle
63 if(round % this.crackle == 0){
64 output += "crackle";
65 }
66 //if the current round number is multiple of pop
67 if(round % this.pop == 0){
68 output += "pop";
69 }
70 //if the output is empty
71 if(output == ""){
72 output += round;
73 }
74
75 return output;
76 }
77 //TODOd complete comments
78 /**
79 * [Method Description]
80 * @param [param name] [What the parameter represents]
81 * @return [What the method returns]
82 */
83
84 /* playGame() takes a single parameter representing the rounds and returns
85 * a String representing the result of the entire game. The helper method
86 * playRound() may be useful here, so you may want to complete it first.
87 */
88
89 //TODO5 implement the playGame method
90 String playGame(int rounds){
91 String result = "";
92 //set the number of snaps,crackles,pops to 0
93 int snaps = 0;
94 int crackles = 0;
95 int pops = 0;
96 for(int i = 1;i <= rounds;i++) {
97 //call the play round function
98 String current_result = playRound(i);
99 //if the current result string has snap in it
100 if(current_result.indexOf("snap") != -1){
101 // to get total number of snaps at last-increment it
102 snaps++;
103 }
104 //if the current result string has crackle in it
105 if(current_result.indexOf("crackle") != -1){
106 //to get total number of crackles at last-increment crackles
107 crackles++;
108 }
109 //if the current result string has pop in it
110 if(current_result.indexOf("pop") != -1){
111 //to get total number of pops at last-increment pops
112 pops++;
113 }
114 result += current_result + "\n";
115 }
116 //add the values to the result with description
117 result += "Number of Snaps: " + snaps + "\n";
118 result += "Number of Crackles: " + crackles + "\n";
119 result += "Number of Pops: " + pops + "\n";
120 return result;
121 }
122
123 //Loop through the rounds of the game
124 //call playRound to handle the specific round
125 //return the total aggregated game results
126
127 //TODOf complete comments
128 /**
129 * [Method Description]
130 * @return [What this method returns]
131 */
132
133 //TODO6 implement the getSnap method
134 int getSnap(){
135 return this.snap;
136 }
137
138 //TODOg complete comments
139 /**
140 * [Method Description]
141 * @return [What this method returns]
142 */
143
144 //TODO7 implement the getCrackle method
145 int getCrackle(){
146 return this.crackle;
147 }
148 //TODOh complete comments
149 /**
150 * [Method Description]
151 * @return [What this method returns]
152 */
153
154 //TODO8 implement the getPop method
155 int getPop(){
156 return this.pop;
157 }
158 }
159
160
161
162 //end class

I finished to do 1-7 but i need help with to do a-h with the comments. please help! thanks!

In: Computer Science

Experiment: Lewis Dot Structures, Hybridization, and Shapes of Molecules and Ions Ion or Compound Number of...

Experiment: Lewis Dot Structures, Hybridization, and Shapes of Molecules and Ions

Ion or Compound

Number of Valence e^- in Structure

Lewis Dot Structure Number of e^- around Central Atom Resonance Structure (If any, show changes) Hybridization Electronic Geometry Molecular Geometry Is the Compound Polar?
H2CO3

S2O2^2-

thiosulfate ion

SF4
AlCl3
XeF4
H3PO3

In: Chemistry

Consider the following experiment. Pick a random integer from 1 to 10^12 . (a) What is...

Consider the following experiment. Pick a random integer from 1 to 10^12 .

(a) What is the probability that it is either a perfect square (1, 4, 9, 16, …) or a perfect cube (1, 8, 27, 64,…)?

(b) What is the probability that it is either a perfect fourth power (1, 16, 81, 256, …) or a perfect sixth power (1, 64, 729, 4096,…)?

In: Statistics and Probability