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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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