Search words using JAVA - Programming
Detailed instructions are inside the PDF document, please follow the instructions, thank you so much! assn1.pdf Unformatted Attachment Preview CSCI2110 Assignment 1 Instructor: Alex Brodsky Due∗: 11:59pm, Thursday, January 23, 2020 The purpose of this assignment is to refresh your programming skills and get you programming as quickly as possible. As discussed in class and the first tutorial, for each problem you will be provided with a description of the problem and a set of tests. These tests can be run on the submission system (Mimir) or on the unix server for this course. You can also use these tests on your own computer as illustrated in the first tutorial. Your code must compile. If it does not compile, you will receive a 0 on the assignment. The assignment consists of three (3) problems, corresponding to minimum (C), expected (B), and outstanding (A) levels of difficulty. That is, solving the first problem yields a grade of C, solving the first two problems yields a grade of B, and solving all three problems yields a grade of A. Background A Word Search puzzle consists of an n × n grid of letters, and list of words that are embedded in the grid. The orientation of the words may be horizontal, vertical, or diagonal, and the word may occur in either direction, e.g., left to right or right to left. Solving a word search puzzle involves finding all the words embedded in it. For example, the figure on the right shows a word search and its solution. Example of a word search puzzle https://technology.amis.nl/ wp-content/uploads/images/ wordSearch-1Solution.jpg Problem 1 (Grade C): Solve a Word Search Write a program called GridSearch.java that reads in a grid of letters and a list of words, and prints out all the words on the list that are embedded in the grid of letters. Input Your program should read in the input using a Scanner object, which is instantiated with System.in. The input will consists of several lines of text. 1. The first line contains a single integer, N , denoting the width and height of the grid. I.e. it’s an N × N grid. ∗ Latest version generated on: January 10, 2020 1 CSCI2110 Winter 2020 Assignment 1 2. The next N lines contain N letters each. The letters are separated by spaces. 3. The next line contains a single integer, W , denoting the size of the word list. 4. The next W lines each contain a single word Hint: Use the Scanner object to easily parse the input. For this assignment you only need to use the nextInt() and next() methods. Processing A word from the list is said to be in the grid if it appears horizontally, vertically, or diagonally in the grid of letters. You may assume that all words and grid letters will be in upper case and at least 2 letter long. The minimum size of the grid is 2×2 and the maximum size of the grid will be 1000×1000. The minimum size of the word list is 1 and the maximum size of the word list is 10000. The same word may occur more than once in the grid and some words in the list may not be in the grid. Output Your program should output to the console (System.out). The output consists of W lines, one per word from the list. Each line contains the number of times the word appears in the grid, a space, and the word. The order of the words must be the same as the input. Examples Sample Input Sample Output 3 A F C D E F G D I 3 FED IE IF 2 FED 1 IE 1 IF Sample Input Sample Output 3 A F C D E F G D I 1 HI 0 HI 2 CSCI2110 Winter 2020 Sample Input Sample Output 3 A B C D E F G H I 3 FED HI GET 1 FED 1 HI 0 GET Assignment 1 Problem 2 (Grade B): Word Search Equivalence Two word search puzzles are said to be equivalent with respect to a list of words if the number of times each word appears in each of the puzzles is the same. Write a program called GridEquiv.java that reads in two letter grids and a list of words, and determines if the two letter grids are equivalent with respect to the list of words. Hint: Your solution to Problem 1 is the starting point to Problem 2. Input The input will consists of several lines of text. 1. 2. 3. 4. 5. 6. The first line contains an integer, M , denoting the width and height of the first grid. The next M lines contain M letters each. The letters are separated by spaces. The next line contains an integer, N , denoting the width and height of the second grid. The next N lines contain N letters each. The letters are separated by spaces. The next line contains an integer, W , denoting the size of the word list. The next W lines each contain a single word Processing Same processing rules as Problem 1. An easy definition of non-equivalence is: if there is a word in the list such that that number of times it appears in the first grid differs from the number of times it appears in the second grid, then the two grids are not equivalent. Note: The locations of the words does not matter. Output Your program should output to the console (System.out). If two grids are equivalent, output Grids are equivalent. 3 CSCI2110 Winter 2020 Assignment 1 Otherwise, output the list of words for which make the two grids not equivalent. These words should be printed one per line, in the order they are in the input list. Examples Sample Input Sample Output 3 A B D E G H 4 X C Y F Z I W V 3 FED HI GET Grids are equivalent. C F I B E H U A D G T Sample Input Sample Output 3 A B D E G H 4 X T Y F Z I W V 3 FED HI GET HI GET C F I B E H U A D G I Problem 3 (Grade A): Word Search Chain Two words in a word search are intersecting if they intersect at a letter. For example, in the figure on the first page, HOLLAND and TOGO are intersecting. Two words are chained if there is a chain of intersections leading from one word to the other. For example, TOGO is chained to 4 CSCI2110 Winter 2020 Assignment 1 SPAIN because TOGO intersects with HOLLAND, which intersects with SPAIN. A grid is chained if each word in the grid is chained to every other word through a series of intersections. An algorithm for determining if a grid is chained is given below. The algorithm takes a list L of “word locations”, where a word location consists of the word, the row and column where it starts in the grid, and the direction (up, down, left, right, etc). (Hint: Creating a WordLocation class may be a good idea.) def isGridChained(L): C = empty list w = L.removeFirst() C.add(w) def findIntersection(C, L): for each w in L: for each c in C: if c intersects w: return w return null while L is not empty: w = findIntersection(C, L) if w != null: L.remove(w) C.add(w) else: return false return true Write a program called GridChain.java that reads in a letter grid and a list of words, and determines if the letter grid is chained with respect to the list of words. Hint: Your solution to Problem 1 is the starting point to Problem 3. Input Same input as Problem 1. Processing Same processing rules as Problem 1. Words that are not in the grid should be ignored. Output Your program should output to the console (System.out). If the grid is chained, output Grid is chained. Otherwise, output the list of words that are not chained to the first word in the list. The list of words should be in the same order as the words in the input list. 5 CSCI2110 Winter 2020 Assignment 1 Examples Sample Input Sample Output 3 A B C D E F G H I 5 AB BE HI HE IF Grid is chained. Sample Input Sample Output 3 A B C D E F G H I 5 AB BE HI HEN IF HI IF Hints and Suggestions • Your code must compile. If it does not compile, you will receive a 0 on the assignment. • Your code must be well commented and indented. Please see the Assignments section for this course on Brightspace for Code Style Guidelines. • You may assume that all input will be correct. You do not need to handle incorrect input, for now. • The problems in this assignment are short. The solutions for problems 1, 2, and 3, are 65, 80, and 140 lines of code, and both problem 2 and 3 start with the solution to problem 1. • Be sure to test your programs using the provided tests or via Mimir. To test without Mimir, see the README.txt file in the provided tests zip file. 6 CSCI2110 Winter 2020 Assignment 1 What to Hand In Submit the source files for your program via Mimir as described in the first tutorial. A link to Mimir is available on Brightspace. At least three of the submitted files must be called GridSearch.java, GridEquiv.java,and GridChain.java, which are the main programs for the three problems. Grading The assignment will be graded based on three criteria: Functionality “Does it work according to specifications?”. This is determined in an automated fashion by running your program on a number of inputs and ensuring that the outputs match the expected outputs. The score is determined based on the number of tests that your program passes. So, if your program passes Tt tests, you will receive that proportion of the marks. Each problem will be graded separately for functionality. Quality of Solution “Is it a good solution?” This considers whether the solution is correct, efficient, covers boundary conditions, does not have any obvious bugs, etc. This is determined by visual inspection of the code. Initially full marks are given to each solution and marks are deducted based on faults found in the solution. Each problem will be graded separated for quality. Code Clarity “Is it well written?” This considers whether the solution is properly formatted, well documented, and follows coding style guidelines. A single overall mark will be assigned for clarity. If your program does not compile, it is considered non-functional and of extremely poor quality, meaning you will receive 0 for the solution. Marks Problem 1: Word Search Functionality Quality of Solution Problem 2: Word Equivalence Functionality Quality of Solution Problem 3: Word Chains Functionality Quality of Solution Code Clarity Total 25 25 5 5 10 10 20 100 7 ... Purchase answer to see full attachment
CATEGORIES
Economics Nursing Applied Sciences Psychology Science Management Computer Science Human Resource Management Accounting Information Systems English Anatomy Operations Management Sociology Literature Education Business & Finance Marketing Engineering Statistics Biology Political Science Reading History Financial markets Philosophy Mathematics Law Criminal Architecture and Design Government Social Science World history Chemistry Humanities Business Finance Writing Programming Telecommunications Engineering Geography Physics Spanish ach e. Embedded Entrepreneurship f. Three Social Entrepreneurship Models g. Social-Founder Identity h. Micros-enterprise Development Outcomes Subset 2. Indigenous Entrepreneurship Approaches (Outside of Canada) a. Indigenous Australian Entrepreneurs Exami Calculus (people influence of  others) processes that you perceived occurs in this specific Institution Select one of the forms of stratification highlighted (focus on inter the intersectionalities  of these three) to reflect and analyze the potential ways these ( American history Pharmacology Ancient history . Also Numerical analysis Environmental science Electrical Engineering Precalculus Physiology Civil Engineering Electronic Engineering ness Horizons Algebra Geology Physical chemistry nt When considering both O lassrooms Civil Probability ions Identify a specific consumer product that you or your family have used for quite some time. This might be a branded smartphone (if you have used several versions over the years) or the court to consider in its deliberations. Locard’s exchange principle argues that during the commission of a crime Chemical Engineering Ecology aragraphs (meaning 25 sentences or more). Your assignment may be more than 5 paragraphs but not less. INSTRUCTIONS:  To access the FNU Online Library for journals and articles you can go the FNU library link here:  https://www.fnu.edu/library/ In order to n that draws upon the theoretical reading to explain and contextualize the design choices. Be sure to directly quote or paraphrase the reading ce to the vaccine. Your campaign must educate and inform the audience on the benefits but also create for safe and open dialogue. A key metric of your campaign will be the direct increase in numbers.  Key outcomes: The approach that you take must be clear Mechanical Engineering Organic chemistry Geometry nment Topic You will need to pick one topic for your project (5 pts) Literature search You will need to perform a literature search for your topic Geophysics you been involved with a company doing a redesign of business processes Communication on Customer Relations. Discuss how two-way communication on social media channels impacts businesses both positively and negatively. Provide any personal examples from your experience od pressure and hypertension via a community-wide intervention that targets the problem across the lifespan (i.e. includes all ages). Develop a community-wide intervention to reduce elevated blood pressure and hypertension in the State of Alabama that in in body of the report Conclusions References (8 References Minimum) *** Words count = 2000 words. *** In-Text Citations and References using Harvard style. *** In Task section I’ve chose (Economic issues in overseas contracting)" Electromagnetism w or quality improvement; it was just all part of good nursing care.  The goal for quality improvement is to monitor patient outcomes using statistics for comparison to standards of care for different diseases e a 1 to 2 slide Microsoft PowerPoint presentation on the different models of case management.  Include speaker notes... .....Describe three different models of case management. visual representations of information. They can include numbers SSAY ame workbook for all 3 milestones. You do not need to download a new copy for Milestones 2 or 3. When you submit Milestone 3 pages): Provide a description of an existing intervention in Canada making the appropriate buying decisions in an ethical and professional manner. Topic: Purchasing and Technology You read about blockchain ledger technology. Now do some additional research out on the Internet and share your URL with the rest of the class be aware of which features their competitors are opting to include so the product development teams can design similar or enhanced features to attract more of the market. The more unique low (The Top Health Industry Trends to Watch in 2015) to assist you with this discussion.         https://youtu.be/fRym_jyuBc0 Next year the $2.8 trillion U.S. healthcare industry will   finally begin to look and feel more like the rest of the business wo evidence-based primary care curriculum. Throughout your nurse practitioner program Vignette Understanding Gender Fluidity Providing Inclusive Quality Care Affirming Clinical Encounters Conclusion References Nurse Practitioner Knowledge Mechanics and word limit is unit as a guide only. The assessment may be re-attempted on two further occasions (maximum three attempts in total). All assessments must be resubmitted 3 days within receiving your unsatisfactory grade. You must clearly indicate “Re-su Trigonometry Article writing Other 5. June 29 After the components sending to the manufacturing house 1. In 1972 the Furman v. Georgia case resulted in a decision that would put action into motion. Furman was originally sentenced to death because of a murder he committed in Georgia but the court debated whether or not this was a violation of his 8th amend One of the first conflicts that would need to be investigated would be whether the human service professional followed the responsibility to client ethical standard.  While developing a relationship with client it is important to clarify that if danger or Ethical behavior is a critical topic in the workplace because the impact of it can make or break a business No matter which type of health care organization With a direct sale During the pandemic Computers are being used to monitor the spread of outbreaks in different areas of the world and with this record 3. Furman v. Georgia is a U.S Supreme Court case that resolves around the Eighth Amendments ban on cruel and unsual punishment in death penalty cases. The Furman v. Georgia case was based on Furman being convicted of murder in Georgia. Furman was caught i One major ethical conflict that may arise in my investigation is the Responsibility to Client in both Standard 3 and Standard 4 of the Ethical Standards for Human Service Professionals (2015).  Making sure we do not disclose information without consent ev 4. Identify two examples of real world problems that you have observed in your personal Summary & Evaluation: Reference & 188. Academic Search Ultimate Ethics We can mention at least one example of how the violation of ethical standards can be prevented. Many organizations promote ethical self-regulation by creating moral codes to help direct their business activities *DDB is used for the first three years For example The inbound logistics for William Instrument refer to purchase components from various electronic firms. During the purchase process William need to consider the quality and price of the components. In this case 4. A U.S. Supreme Court case known as Furman v. Georgia (1972) is a landmark case that involved Eighth Amendment’s ban of unusual and cruel punishment in death penalty cases (Furman v. Georgia (1972) With covid coming into place In my opinion with Not necessarily all home buyers are the same! When you choose to work with we buy ugly houses Baltimore & nationwide USA The ability to view ourselves from an unbiased perspective allows us to critically assess our personal strengths and weaknesses. This is an important step in the process of finding the right resources for our personal learning style. Ego and pride can be · By Day 1 of this week While you must form your answers to the questions below from our assigned reading material CliftonLarsonAllen LLP (2013) 5 The family dynamic is awkward at first since the most outgoing and straight forward person in the family in Linda Urien The most important benefit of my statistical analysis would be the accuracy with which I interpret the data. The greatest obstacle From a similar but larger point of view 4 In order to get the entire family to come back for another session I would suggest coming in on a day the restaurant is not open When seeking to identify a patient’s health condition After viewing the you tube videos on prayer Your paper must be at least two pages in length (not counting the title and reference pages) The word assimilate is negative to me. I believe everyone should learn about a country that they are going to live in. It doesnt mean that they have to believe that everything in America is better than where they came from. It means that they care enough Data collection Single Subject Chris is a social worker in a geriatric case management program located in a midsize Northeastern town. She has an MSW and is part of a team of case managers that likes to continuously improve on its practice. The team is currently using an I would start off with Linda on repeating her options for the child and going over what she is feeling with each option.  I would want to find out what she is afraid of.  I would avoid asking her any “why” questions because I want her to be in the here an Summarize the advantages and disadvantages of using an Internet site as means of collecting data for psychological research (Comp 2.1) 25.0\% Summarization of the advantages and disadvantages of using an Internet site as means of collecting data for psych Identify the type of research used in a chosen study Compose a 1 Optics effect relationship becomes more difficult—as the researcher cannot enact total control of another person even in an experimental environment. Social workers serve clients in highly complex real-world environments. Clients often implement recommended inte I think knowing more about you will allow you to be able to choose the right resources Be 4 pages in length soft MB-920 dumps review and documentation and high-quality listing pdf MB-920 braindumps also recommended and approved by Microsoft experts. The practical test g One thing you will need to do in college is learn how to find and use references. References support your ideas. College-level work must be supported by research. You are expected to do that for this paper. You will research Elaborate on any potential confounds or ethical concerns while participating in the psychological study 20.0\% Elaboration on any potential confounds or ethical concerns while participating in the psychological study is missing. Elaboration on any potenti 3 The first thing I would do in the family’s first session is develop a genogram of the family to get an idea of all the individuals who play a major role in Linda’s life. After establishing where each member is in relation to the family A Health in All Policies approach Note: The requirements outlined below correspond to the grading criteria in the scoring guide. At a minimum Chen Read Connecting Communities and Complexity: A Case Study in Creating the Conditions for Transformational Change Read Reflections on Cultural Humility Read A Basic Guide to ABCD Community Organizing Use the bolded black section and sub-section titles below to organize your paper. For each section Losinski forwarded the article on a priority basis to Mary Scott Losinksi wanted details on use of the ED at CGH. He asked the administrative resident