Write a program to read in a file

Assignment Help Programming Languages
Reference no: EM131062053

You will write a program to read in a file and found out how many groupings (blobs) of characters there are in the file. The image below is a sample input file. Note that it contains 6 groupings of characters or blobs.

A character is part of a grouping or blob if it touches another character in the grouping on 1 of 8 positions around it. (immediately above, left, right, below and on each corner) Notice that one of the groupings or blobs is located inside of another.

You will open a file called blob.txt which will be provided to you. The file will contain exactly 20 records each of which is exactly 70 characters long. Your program can make the assumption that both the file name and size of the file (rows and columns) are exact. The characters will either be a space (blank ) or have an upper case X.

Reference no: EM131062053

Questions Cloud

Write an application that asks the user to enter hourly wage : Write an application that asks the user to enter the base hourly wage for an employee and then asks the user to enter the number of hours worked for each week in the 4-week pay period.
Determine the required thickness of the wall of the tank : A large spherical tank (see figure) contains gas at a pressure of 450 psi. The tank is 42 ft in diameter and is constructed of high-strength steel having a yield stress in tension of 80 ksi. Determine the required thickness (to the nearest 1/4 inc..
One molecule of dissolve sulfur : A solution containing 3.24g of sulfur in 40g of benzene boils 0.81 C above the boiling point of pure benzene. Determine the number of S atoms in one molecule of dissolve sulfur. Kb for benzene is 2.53 C/m
Independent variable of the activity : What is the independent variable of the activity? What is the dependent variable of the activity? What variables were controlled during the activity?
Write a program to read in a file : You will write a program to read in a file and found out how many groupings (blobs) of characters there are in the file. The image below is a sample input file. Note that it contains 6 groupings of characters or blobs.
Determine the required thickness to the nearest millimeter : Solve the preceding problem if the internal pressure is 3.75 MPa, the diameter is 19 m, the yield stress is 570 MPa, and the factor of safety is 3.0
Estimate the concentration : The pH of .01 M H3PO4(aq) is 2.2. Estimate the concentration of PO4^-3 in the solution. For H3PO4, the values of Ka1, Ka2, and Ka3 are 7.6E-3, 6.2E-8, and 2.1E-13 respectively.
Create a program for a ledger''s furniture store : Create a program for a Ledger's Furniture Store. Create a pseudocode program using Notepad++ to solve this problem. Third, create the program with RAPTOR.
Find the tensile force f in each bolt and the tensile stress : Find the tensile force F in each bolt and the tensile stress σ in the viewport if the radius of the hemisphere is 7.0 in. and its thickness is 1.0 in

Reviews

Write a Review

Programming Languages Questions & Answers

  What are application programming interfaces apis recognize

what are application programming interfaces apis? identify several apis that could or do exist in the software

  Create the behavioral vhdl model for thirty two-bit alu

Create the behavioral VHDL model for 32-bit ALU. The ALU has 4-bit "op" control singal. Relationship between the "op" and operations of ALU.

  Research on programmer defined functions

Write a 2 page research paper (excluding title and reference pages) on programmer-defined functions. Explain the concepts discussed in the textbook using at least an example not included in the textbook.

  Create an order class constructor that takes parameters

Create a class named Order that performs order processing of a single item that sells for $19.99 each.

  Create program to randomly access data on stocks

A small mutual company wishes you to create program to randomly access data on stocks it holds. Presently, data are stored in a text file, each line of which contains following: a stock code.

  Create new method for random turning

Create new method named randomTurn (this method has no parameters and returns nothing). Select the code that does the random turning.

  What will the following program segments display

What will the following program segments display

  Design implement application displays button-label on screen

Design an implement an application that displays a button and a label on a screen. Every time the button is pushed, the label will display a random number.

  Create memo to grace to outline purposes of organization

Create a memo to Grace in which you outline purposes of organization and costs and benefits of becoming a member.

  Framework of the program

Write a program to read in up to 100 positive real values from a data file that everyone will name "p4data.dat" , output them in ascending order , calculate and print the average , the median , the variance , and the standard deviation . The..

  Write a javascript program for the validation

Write a JavaScript program for the validation case using the RegExp method - If the user enters a valid phone number, convert it to the form (123)456-7890 (if it is not already in this form).

  How is recursion and iteration used in programming

How is recursion and iteration used in programming? Provide examples of the various types of recursion and iteration and explain why each is used

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd