working with char vector using array the class fixedvector has been declared and was 4951908

Working with char vector using Array The class FixedVector has been declared and was implemented. Thecode is available here. You want to use additional operationswithin the class, so the function member insert needs to bechanged, as well as two new functions members, find and operator ==need to be added to the class definition and implemented. Considerthe new class definition below, and the new/modified functionsbeing in bold. // Augmented Declaration

template

class FixedVector {

private:

   size_t size_; // number of elements in the datastructure

   const size_t capacity_; // length of thearray

   T* array_; // pointer to dynamically allocatedarray public:

   // Constructors

   FixedVector(size_t arraysize = 0);        // Also serves asdefault constructor

   FixedVector(const FixedVector& input );   // Copy constructor

   ~FixedVector();    // Getters / Setters

   T& at(size_t index);

   T& operator[](size_t index);

   void push_back(const T& value);

   void set(size_t index, const T& value);

   void erase(size_t index);    
size_t find(const T& value);
   size_t insert(size_t beforeIndex, const T&value);


   size_t size();

   bool empty();

   void clear();    // Overloaded Operators

   FixedVector& operator= (constFixedVector& rhs); //Copy assignment    
bool   operator== (constFixedVector& rhs)

}; // Function member to look for value in FixedVector // If value is in the FixedVector, then return the index ofFixedVector that contains

// the value. If size_ is 0 (array is empty) or the value is not inFixedVector, then // return size_ template size_t FixedVector::find(const T& value) { // to be completed } // Function member to insert value in the FixedVector at indexbeforeIndex and return

// beforeIndex // If beforeIndex is between 0 and size_, then insert the valueby pushing all the

// elements to the right of beforeIndex one position to the right,and increment size_ // If size would exceed capacity, then exit with an error // If beforeIndex is >=size_ then display error and do not doany changes to FixedVector template size_t FixedVector::insert(size_t beforeIndex, constT& value) { // to be completed } // Function member to test the equality between twoFixedVectors // It returns true if the two FixedVectors are exactly the same,false otherwise template bool FixedArray::operator== (const FixedVector&rhs){

// to be completed } int main() { // testing the new implementation of a FixedVector // declare & initialize a FixedVector of int with 10elements FixedVector Array1(5); // place 1,5,10 in the array cout Array2(5); Array2.push_back(1); Array2.push_back(5); Array2.push_back(10); if (Array1 == Array2)    cout Attached

buying stock with a market order you would like to buy shares of ralph lauren rl the 3819570

Buying Stock with a Market Order You would like to buy shares of Ralph Lauren (RL). The current bid and ask quotes are $85.14 and $85.22, respectively. You place a market buy-order for 400 shares that executes at these quoted prices. How much money did it cost to buy these shares?

Portfolio Weights If you own 770 shares of Air Line Inc at $43.4, 390 shares of BuyRite at $56.65, and 490 shares of Motor City at $10.7, what are the portfolio weights of each stock?

Average Return The past five monthly returns for PG Company are 4.15 percent, -.05 percent, 5.55 percent, 7.69 percent, and 5.24 percent. What is the average monthly return?

Under/Over Valued Stock A manager believes his firm will earn a 12.70 percent return next year. His firm has a beta of 1.48, the expected return on the market is 9.8 percent, and the risk-free rate is 4.8 percent. Compute the return the firm should earn given its level of risk and determine whether the manager is saying the firm is under-valued or over-valued.

Under/Over Valued Stock A manager believes his firm will earn a 17.4 percent return next year. His firm has a beta of 1.64, the expected return on the market is 15.4 percent, and the risk-free rate is 5.4 percent. Compute the return the firm should earn given its level of risk and determine whether the manager is saying the firm is under-valued or over-valued.

i need help with this assignment search in document review smartart charts tables do 5176838


Search in Document Review SmartArt Charts Tables Document Elements Layout Themes Insert Styles Paragraph Font Aa A A- A- Aa 1
Search In Document Layout Document Elements Tables Charts SmartArt Review Font Paragraph Styles Insert Themes EE Ab A A 14 Aa

I need help with this assignment Search in Document Review SmartArt Charts Tables Document Elements Layout Themes Insert Styles Paragraph Font Aa A A- A- Aa 14 Themes Text Box Styles ABE A A2 Instructions: For the purpose of grading the project you are required to perform the following tasks: 4 Points Possible Instructions Step Download and open the fle named exploring e12c2Schedule.xlsx, and then save the fle as e12c2Schedule LastFirst, replacing Lastfirst with your name. 0.000 1 On the Sequential worksheet, apply the Retrospect theme and the Aspect theme color. Apply Heading 3 cell style to the column labels in the range A4:K4 10.000 2 Record a macro named RoomSort, Click and drag to select the range AM:K46 from the Sequential worksheet, then copy and paste the data in cell A4 of the Room worksheet. Do not stop the recording after this step. With the macro still recording, ck cel 4. On the Data tab, in the Sort &Fiter group, click Sort. Using the Sort dialog box, sort the data by Room in alphabetical order. Add a second level sort that sorts the Days column using the following custom sort order: MWF, MW, M, W. TR, T, R. s. Add a third level sort that sorts the Start Time column from earliest to latest. Retun to the Sequential worksheet, click cell A1 and stop the recording. Save the workbook as a Macro-Enabled Template. 10.000 3 15.000 4 With Al of the Sequential worksheet selected, record a macro named EacultySort Click and drag to select the range M:K46 from the Sequential worksheet, then copy and paste the data in cell A4 of the Faculty worksheet. Do not stop the recording after this step 10.000 With the macro still recording, didk cell A4. Create a custom sort that does the folowing: Sort Instructor in alphabetical order, then by Days with the custom order created in the prior step (Step 4), then by Start Time from earlest to lateest. After the sort is complete, return to cell A1 on the Sequential worksheet and stop recording. 10.000 Insert a form control button filling the range E1:0 in the Sequential worksheet and assign it to the RoomSort macro 16.000 7 Edit the text that appears on the splay the text RoomSort 2.000 Using the prior steps as a quide,, create a second button that displays the text EncultySort filing the range F1H0 and assign it to the EacitySort macro. Once completed, save the macro-enabled template 12.000 Print Layout View Words: Sec Pages 1 of 2 100% 25 40H m Search In Document Layout Document Elements Tables Charts SmartArt Review Font Paragraph Styles Insert Themes EE Ab A A 14 Aa Aa A ABE A A2 ABC Styles Text Box Themes office 2016-mytlab grader-nstructions Exce Projc Step Instructions Points Possible 10 Create a new worksheet named Code to the right of the Faculty sheet 5.000 Open the VBA Editor and display the module containing the room sort. Copy the code beginning with the text Sub RoomSort (0 and ending with the first instance of the text End Sub Paste the contents in cell A1 of the Code worksheet. Ensure that the copied code is formatted as Text. Do not close the VBA Editor, 11 5,000 Display the mopule containing the faculty sort. Copy the code beginning with the text Sub EacubSort 0thd ending with the final instance of the text End Sub Paste the contents in cell F1 of the Code worksheet, Ensure that the copied code is formated as Text. Close the VBA Editor 17 5.000 Save the fle as an Excel Workbook (not macro-enabled) with the name e12c1Schedule solution. Ensure that the workbooks are displayed in the folowing order Sequential, Room, Facuity, and Code. Close the workbook and eit Excel. Submit the e12ctSchedule solutionlsr workbook as directed 13 0.000 Total Points 100.000 Print Layout View Sec Pages: Words 1 of 2 100 % 25 20 F3 44 4ON

4 10 pts show what is printed by the following program assume that the data values s 5149256


4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in 4. (10 pts) Show what is printed by the following program. Assume that the data values shown are typed in, one at a time, in response to the prompts: 2 10 6 5 21 problem 4 */ import java.util.Scanner; public class problem4 public static void main(String[] args) int j-0, k-0, x-1, sum-0; Mau peoqkay JouueoS Scanner(System.in); while (x5) { k 0; System.out.print(“type in a number: “); jkeyboard.nextlnt); (6DJ! sum sum +2 j; else k +1; +j+” System.out.println (x + :(uns + “+ ++x śystem.out.printin (x + ” “+j+” “+k keyboard.close); (ums + (

suppose that in the context of the price specie flow mechanism switzerland currently 3644318

Suppose that, in the context of the price-specie-flow mechanism, Switzerland currently exports 5,000 units of goods to Spain, with each export unit having a price of 100 Swiss francs. Hence, Switzerland’s total value of exports to Spain is 500,000 Swiss francs. At the same time, Switzerland imports 410,000 francs’ worth of goods from Spain, and thus has a trade surplus with Spain of 90,000 Swiss francs ( 5500,000 francs 2 410,000 francs). Because of this trade surplus, suppose that all prices in Switzerland now rise uniformly by 10 percent, and assume that this rise in price of Swiss goods causes its imports from Spain to rise from their initial level of 410,000 francs to a level of 440,000 francs. (For purposes of simplicity, assume that the price level in Spain does not change.) Suppose now that the elasticity of demand of Spanish consumers for Swiss exports is (ignoring the negative sign) equal to 2.0. With the 10 percent rise in the price level in Switzerland, the Swiss export price for each unit of its exports thus rises to 110 francs. With this information, calculate the resulting change in quantity and the new total value of Swiss exports. Has the price rise in Switzerland been sufficient to eliminate its trade surplus with Spain? Why or why not? Alternatively, suppose that the elasticity of demand of Spanish consumers for Swiss exports (again ignoring the negative sign) is equal to 0.2. With the 10 percent rise in Swiss export prices, what happens to Switzerland’s trade surplus with Spain in this case?

write a developed research proposal of up to 2000 maximum words not including title 3501572

Write a developed research proposal of up to 2000 maximum words (not including title page, abstract, references, notes, figures and tables). The research proposal must include the following: 1- Title page ?include report title (descriptive of the research topic). 2- Table of Contents includes the numbered sections and subsections of the report and associated page numbers. 3- Text should be in Times New Roman, 12pt, double-spaced and margins of 2.5 cm. Use numbered headings and subheadings (optional). Include page numbers in the footer of the report. 4- Abstract The first page, numbered page 1, should include a one-paragraph detailed abstract of 150 maximum words. The abstract should describe the purpose of the research, theoretical basis of the hypotheses, analyses, and implications of the findings. 5- Introduction The text should begin on page 2. Page numbering should continue through all pages of the report including footnotes, appendixes, references, tables, and figures. Discuss the background to the research problem and provide a justification for the research. Sections should include: Statement of the research problem; Research aims; Significance of the study. 6-Literature Review Review the key literature to identify what work has been completed and published in the research area. (You can include content from your literature review report but do not just cut and paste it, rather, update and improve it based on feedback you have received and connect it with the other sections of your research proposal). Include a developed theoretical framework (i.e., conceptual model) that illustrates the relationships between variables central to your study. 7- Research Design and Methodology Likely or preferred research methods with reasons and justification. Research design. Develop research questions and/or research hypotheses. Describe instrumentation. List procedures including sources of data (likely sources such as organisations, institutions and populations), sample selection, data collection methods (e.g. focus groups, interviews, online survey questionnaire etc.). 8- Data Analysis Outline potential ways that the data could be organised and analysed. 9- Expected Resources Budget (e.g., equipment, software or field work costs if any); Timeframe and conditions required to complete the research (e.g. field trips, access to archives etc.). 10- Research Project Plan Schedule or timeline of activities. 11- References should conform Harvard style referencing style. Where applicable, author(s) name(s), journal title/book title, chapter title/article title, year of publication, volume number/book chapter and the pagination must be present. Use of DOI is highly encouraged. Please consider the following when writing your research proposal: 1. Make a case for your research question and your approach to answering it. Do this by showing that there is key literature (and therefore a research community that you are joining) which supports the methodology you will use and its application in your discipline. In other words, provide sufficient theoretical frameworks as you discuss your rational and/or justification leading to your hypotheses. Highlight gaps in the literature that the research will address. 2. Articulate and justify the research approach and plan. Show which methods you will use (i.e., how you would conduct the research). Do this in as much detail as possible thinking through logistical issues e.g. I will use a case study approach ? where will you conduct your case study and why? Justify your choices in relation to the research question. Make sure your methods would actually allow you to answer your research question and/or hypotheses. 3. You do not have to undertake actual data collection or analysis, BUT it should be clear how you would do both. 4. The research proposal must be formatted according to accepted academic requirements for formal written work.
Hide

view the top 15 rules and summarize what they suggest cookie monster inc is a compan 5155232


View the top 15 rules, and summarize what they suggest. Cookie Monster Inc. is a company that specializes in the development View the top 15 rules, and summarize what they suggest. Cookie Monster Inc. is a company that specializes in the development of software that tracks Web browsing history of individuals. A sample of browser histories is provided in the file CookieMonster. Using binary matrix format, the entry in row i and column indicates whether Web site j was visited by user i. Using a minimum support of 800 transactions and a minimum confidence of 50 percent, use XLMiner to generate a list of association rules. Review the top 14 rules. What informa- tion does this analysis provide Cookie Monster regarding the online behavior of individuals? 9. A grocery store introducing items from Italy is interested in analyzing buying trends of new international items: prosciutto, pepperoni, risotto, and gelato. Using a minimum support of 100 transactions and a minimum confidence of 50 per- cent, use XLMiner to generate a list of association rules. How many rules satisfy this criterion? 8. a. b. Using a minimum support of 250 transactions and a minimum confidence of 50 per- cent, use XLMiner to generate a list of association rules. How many rules satisfy this criterion? Why may the grocery store want to increase the minimum support required for their analysis? What is the risk of increasing the minimum support required? c. Using the list of rules from part b, consider the rule with the largest lift ratio that in- volves an Italian item. Interpret what this rule is saying about the relationship between the antecedent item set and consequent item set. d. Interpret the support count of the item set involved in the rule with the largest lift ratio that involves an Italian item. Interpret the confidence of the rule with the largest lift ratio that involves an Italian item. Interpret the lift ratio of the rule with the largest lift ratio that involves an Italian item. What insight can the grocery store obtain about its purchasers of the Italian fare? e. f. g. Campaign organizers for both the Republican and Democrat parties are interested in iden- …ha would.consider voting for their party in an upcom-

this final assignment is your opportunity to apply all your content knowledge practi 3599067

This final assignment is your opportunity to apply all your content knowledge & practice from class to writing for the real world. The OpEd absolutely helps indicate where your grade lands on the W2 grade rubric. Do not “wing it”. Revise thoroughly.

Assignment Requirements and Deadlines:

• Real-life submission information (instructions, addresses, etc.) must be printed at the end of the paper.

• Draft OpEd, about two pages double-spaced, due Monday 3/4. Bring three paper copies for in-class group.

Instructions and Outcomes:

Genre: This assignment can take one of three forms.

A. Opinion piece: An opinion editorial is either like a column or like a news item with opinion. Refer to op-eds in recent newspapers for format. Many newspapers post their format requirements. A couple of models are posted on Canvas. See also http://www.berkeley.edu/news/media/cc/tips-oped.shtml.

B. Letter to the editor: This is usually a response to something recently published or reported. As a response, it takes to task certain statements or facts (deconstructing a fallacious argument) or provides a meaningful counter-argument. If you use this format, please provide the original news item prompting the response when you turn in your assignment. You will make this longer than most “letters” and instead it will be around one page, double-spaced.

C. Letter to whomever: There may be a direct letter-writing action that you want to take and you are welcome (encouraged!) to use this assignment to write an excellent letter.

Your Assignment: The purpose of this assignment is twofold: 1) work on concise writing along with direct, active style, and 2) improve your argument development. Work to show   off your mastery of everything you practiced and learned (otherwise known as this course’s content!).

1. Choose a topic. What topic, you say? Any topic!

a. What are you involved with at this point in the quarter?

b. Where do you have a strong enough opinion to really want to get your voice heard on an issue?

c. What letter would you love to write (and write well!) then really put in the mail?

d. If you need a default topic, use your argument paper, but narrow the point of your argument.

2. Find a specific audience.

a. Locate submission information for your piece.

b. Include contact info! Without complete contact or submission info, the assignment is incomplete.

c. While there is no class requirement to submit your editorial to its intended audience, you are encouraged to do so.

3. Write and develop a concise and persuasive argument.

4. Revise, revise, revise. We do minimal in-class peer review and there is very limited instructor involvement. This paper is all you (but we will serve as an audience while you revise).

Review of your argument, rhetoric, and style practice:

1. Argument: In our five-week unit on argument and argument structure, you worked on—

a. Standard argument format mapping and analysis of claims/support/thesis confirmation with the Ratio firmamentum task, followed by revision for improved logical reasoning and argument structure.

b. Toulmin argument (warrants, backing, reasons, & etc.) and syllogism, along with inductive & deductive reasoning.

c. Coherence and cohesion, including logical relationships (in peer response) and reading backwards through the paper to find jumps, hidden assumptions or premises, and opportunities for better micro-cohesion.

d. Indicating all logical relationships within our sentences through logical joining words (chart in Lab 10 notebook task).

e. Counter-argument, rebuttal, and refutation (possibly, if time for final debates).

2. Rhetoric: You worked on—

a. Identifying euphemisms and positions in Lab 8 notebook task.

b. Identifying fallacies in Lab 9 notebook task.

c. Identifying logos, ethos, and pathos; using these consciously in your own writing.

3. Concision and Active, Direct Style: Through revision and tasks, both in-class and in homework, you have worked on—

a. Naming clear, definite actors and avoiding vague pronouns. See Actors and Actions resources.

b. Reducing passive sentences and “to be” verbs, along with other weak verbs. See Actors and Actions resources.

c. Signaling and Integrating sources. See Integrating Sources resources.

d. Cohesion. See Logical coherence and cohesion resource.

e. And finally, concision. See Concision resource (Williams).

question 1 sandhill enterprises owns the following assets at december 31 2017 cash i 3622825

Question 1

Sandhill Enterprises owns the following assets at December 31, 2017.

Cash in bank—savings account

 

71,700

 

Checking account balance

 

27,000

Cash on hand

 

8,400

 

Postdated checks

 

900

Cash refund due from IRS

 

38,800

 

Certificates of deposit (180-day)

 

94,380

What amount should be reported as cash?

Cash to be reported

 

$

 

Question 2

Blue Family Importers sold goods to Tung Decorators for $45,000 on November 1, 2017, accepting Tung’s $45,000, 6-month, 5% note.

Prepare Blue’s November 1 entry, December 31 annual adjusting entry, and May 1 entry for the collection of the note and interest. (If no entry is required, select “No Entry” for the account titles and enter 0 for the amounts. Credit account titles are automatically indented when the amount is entered. Do not indent manually. Record journal entries in the order presented in the problem.)

Question 3

Your accounts receivable clerk, Mitra Adams, to whom you pay a salary of $3,345 per month, has just purchased a new Acura. You decide to test the accuracy of the accounts receivable balance of $182,860 as shown in the ledger.

The following information is available for your first year in business.

(1)

 

Collections from customers

 

$441,540

(2)

 

Merchandise purchased

 

713,600

(3)

 

Ending merchandise inventory

 

200,700

(4)

 

Goods are marked to sell at 40% above cost

   

Compute an estimate of the ending balance of accounts receivable from customers that should appear in the ledger and any apparent shortages. Assume that all sales are made on account.

The ending balance of accounts receivable from customers

 

$

Apparent shortage

 

$

 

Question 4

The trial balance before adjustment of Whispering Inc. shows the following balances.

   

Dr.

 

Cr.

Accounts Receivable

 

$96,700

   

Allowance for Doubtful Accounts

 

3,050

   

Sales Revenue (all on credit)

     

$723,000

Give the entry for estimated bad debts assuming that the allowance is to provide for doubtful accounts on the basis of (a) 5% of gross accounts receivable and (b) 6% of gross accounts receivable and Allowance for Doubtful Accounts has a $1,654 credit balance. (If no entry is required, select “No Entry” for the account titles and enter 0 for the amounts. Credit account titles are automatically indented when the amount is entered. Do not indent manually.)

Question 5

Sandhill, Inc. decided to establish a petty cash fund to help ensure internal control over its small cash expenditures. The following information is available for the month of April.

1. On April 1, it established a petty cash fund in the amount of $265.
2. A summary of the petty cash expenditures made by the petty cash custodian as of April 10 is as follows.

Delivery charges paid on merchandise purchased

 

$76

Supplies purchased and used

 

41

Postage expense

 

49

I.O.U. from employees

 

33

Miscellaneous expense

 

52

The petty cash fund was replenished on April 10. The balance in the fund was $12.

3. The petty cash fund balance was increased by $116 to $381 on April 20.

Prepare the journal entries to record transactions related to petty cash for the month of April. (If no entry is required, select “No Entry” for the account titles and enter 0 for the amounts. Credit account titles are automatically indented when the amount is entered. Do not indent manually.)

Question 6

Kimmel Company uses the net method of accounting for sales discounts. Kimmel also offers trade discounts to various groups of buyers.

On August 1, 2017, Kimmel sold some accounts receivable on a without recourse basis. Kimmel incurred a finance charge.

Kimmel also has some notes receivable bearing an appropriate rate of interest. The principal and total interest are due at maturity. The notes were received on October 1, 2017, and mature on September 30, 2019. Kimmel’s operating cycle is less than one year.

Using the net method, how should Kimmel account for the sales discounts at the date of sale? What is the rationale for the amount recorded as sales under the net method?Using the net method, what is the effect on Kimmel’s sales revenues and net income when customers do not take the sales discounts?What is the effect of trade discounts on sales revenues and accounts receivable? Why?

How should Kimmel account for the accounts receivable factored on August 1, 2017? Why?

How should Kimmel account for the note receivable and the related interest on December 31, 2017? Why?

Question 8

From inception of operations to December 31, 2017, Buffalo Corporation provided for uncollectible accounts receivable under the allowance method. The provisions are recorded, based on analyses of customers with different risk characteristics. Bad debts written off were charged to the allowance account; recoveries of bad debts previously written off were credited to the allowance account, and no year-end adjustments to the allowance account were made. Buffalo’s usual credit terms are net 30 days.

The balance in Allowance for Doubtful Accounts was $147,300 at January 1, 2017. During 2017, credit sales totaled $9,061,900, the provision for doubtful accounts was determined to be $181,238, $90,619 of bad debts were written off, and recoveries of accounts previously written off amounted to $16,980. Buffalo installed a computer system in November 2017, and an aging of accounts receivable was prepared for the first time as of December 31, 2017. A summary of the aging is as follows.

Classification by
Month of Sale

 

Balance in
Each Category

 

Estimated %
Uncollectible

November–December 2017

 

$1,265,100

   

2%

July–October

 

677,000

   

10%

January–June

 

421,600

   

24%

Prior to 1/1/17

 

157,300

   

74%

   

$2,521,000

     

Based on the review of collectibility of the account balances in the “prior to 1/1/17” aging category, additional receivables totaling $61,300 were written off as of December 31, 2017. The 74% uncollectible estimate applies to the remaining $96,000 in the category. Effective with the year ended December 31, 2017, Buffalo adopted a different method for estimating the allowance for doubtful accounts at the amount indicated by the year-end aging analysis of accounts receivable.

Prepare a schedule analyzing the changes in Allowance for Doubtful Accounts for the year ended December 31, 2017. Show supporting computations in good form. (Hint: In computing the 12/31/17 allowance, subtract the $61,300 write-off.)

BUFFALO CORPORATION
Analysis of Changes in the
Allowance for Doubtful Accounts
For the Year Ended December 31, 2017

final project points 200 overview we are going to do a clone of the minesweeper game 5151401

Final Project, Points: 200        Overview    We are going to do a clone of the Minesweeper Game.  

    Requirements  

Minesweeper is a two dimensional grid that has mines hidden randomly throughout the game space. The player guesses a cell in the grid. If the cell has a mine in it the mine goes off and the game is over. If the cell does not have a mine in it the game will reveal all of the adjacent blank cells. If any of the cells have mines adjacent to them then a number is placed in that cell that indicates how many mines are adjacent. Once all the blank cells and cells with numbers have been revealed the player is given the opportunity to guess at another cell. Once all of the non-mine cells have been revealed the player wins.

Our game will have ten (10) cells with mines in it.

The initial filling of the grid will be done with a random generator to determine the location of the cells with mines.

The game will ask the player for a height and width to create the minefield two dimensional grid.

For this assignment we will use three classes, the main minesweeper class, a game class and a grid class.

The minesweeper class will have the main method in it and will create a new game object and call the start method out of the game object.

The game class will have the following methods:

  • void start(): This method will be the starting point of the game. It will need to ask the user to input the height and width of the grid, initialize the grid using the height and width, and call the gameLoop
  • void gameLoop(): This method will be the main loop that runs the game. This method will ask the user to input the cell that they want to check and will call the checkLocation method passing the cell location that the user just inserted.
  • int numberOfMines(int row, int col): This method will count the number of mines that are adjacent to the cell that is at the location given by the row and col values passed to it.
  • boolean checkLocation(int row, int col): This method will check if the location that is given by the row and col value has a mine. If it does not then it will call the clearBlanks method giving the current location.  void clearBlanks(int row, int col): This method will reveal all of the cells that are adjacent to the cell at the location given by the row and col values. If one of the adjacent cells has a mine adjacent to it, then a number will be put in that cells location that corresponds to the number of mines that are adjacent. If one of the adjacent cells does not have any mines adjacent to it, then that cell will be turned into a blank and the cells around it will be revealed and checked for mines. This process will continue until the only cells left all have numbers indicating the number of mines.

The grid class will have a constructor that takes two parameters, a height and a width. It will also have the following methods:

  • randomFillGrid(): This method will randomly place mines in the grid.
  • displayGrid(): This method will display the grid with the hidden and revealed cells.
  • displayGridData(): This method will display the grid with the locations of the mines revealed.

The previous list of methods is a minimum requirement. You can have more methods than these. However, these methods must appear and be used in your project.

There are some sample screenshots in a following section.  

Screen Shots   These screen shots are examples of what your application should look like.

run: Enter the height of the grid: 10 Enter the width of the grid: 10 There are a total of 10 mines in the mine field.    

        12 3 4 5 6 7 8 9 10

  1. * * * * * * * * * *

* * * * * * * * * *

  1. * * * * * * * * * *
  2. * * * * * * * * * *
  3. * * * * * * * * * *
  4. * * * * * * * * * *
  5. * * * * * * * * * *

* * * * * * * * * *

  1. * * * * * * * * * *
  2. * * * * * * * * * *
  3. **************
  4. **************

Pick a spot to check for a mine. First enter the row number then the column number: 10 10 There are a total of 10 mines in the mine field.    

1 2 3 4 5 6 7 8 9 10

  1. * * * * * * * * * *
  2. * * 4 2 2 2 2 2 2
  3. 2 2 1              
  4.                        
  5.       
  6.                   
  7.                          
  8.            
  9.            

Pick a spot to check for a mine.

First enter the row number then the column number:

1

5

There are a total of 10 mines in the mine field.     

1 2 3 4 5 6 7 8 9 10

  1. * * * * 2 * * * * *

2   * * 4 2 2 2 2 2 2 2

3    2 2 1              

  1.                
  2.                       

Pick a spot to check for a mine.

First enter the row number then the column number:

1

8

There are a total of 10 mines in the mine field.     

12 3 4 5 6 7 8 9 10

  1. * * * * 2 * * 2 * *
  2. * * 4 2 2 2 2 2 2
  3. 2 2 1              

4                       

5                       

6                        

7                        

8                      

9                        

10                       

You Win!

BUILD SUCCESSFUL (total time: 2 minutes 52 seconds)

run:

Enter the height of the grid:

10

Enter the width of the grid:

10

There are total of 10 mines in the mine field

12345678910

  1. * *********
  2. * *********
  3. ***********
  4. ***********
  5. ***********
  6. ***********
  7. ***********
  8. ***********
  9. ***********
  10. ***********

Pick a spot to check for a mine.

First enter the row number then the column number:

1

1

GameOver!

There are a total of 10 mines in the mine field

                12345678910

  1. * .* * . . . . . *
  2. . . * . * . . . . *
  3. * * * . . . . . . .
  4. …………………..
  5. ……………………
  6. …………………..
  7. ………………….
  8. ………………….
  9. ………………….
  10. ………………….

BUILD SUCCESSFUL (total time: 4 seconds