Edhesive 3.7 code practice

Answers

Answer 1
Yes that answer is correct 3.7
Answer 2

Answer: To hard to answer :)

Explanation: hurts my brain


Related Questions

You are on a team of developers writing a new teacher tool. The students names are stored in a 2D array called “seatingChart”. As part of the tool, a teacher can enter a list of names and the tool well return the number of students in the class found with names that matching provided list. For this problem you will be completing the ClassRoom class in the problem below. Your job is to complete the numberOfStudents found method. This method accepts an array of Strings that contain names and returns the quantity of students with those names. For example:
Assume that a ClassRoom object named “computerScience” has been constructed and the seating chart contains the following names:


“Clarence”, “Florence”, “Ora”


“Bessie”, “Mabel”, “Milton”


“Ora”, “Cornelius”, “Adam”


When the following code executes:


String[] names = {"Clarence", "Ora", "Mr. Underwood"};

int namesFound = computerScience.numberOfStudents(names);

The contents of namesFound is 3 because Clarence is found once, Ora is found twice, and Mr. Underwood is not found at all. The total found would be 3.


Complete the numberOfStudents method

public class ClassRoom

{


private String[][] seatingChart;


//initializes the ClassRoom field seatingChart

public ClassRoom(String[][] s){

seatingChart = s;

}



//Precondition: the array of names will contain at least 1 name that may or may not be in the list

// the seating chart will be populated

//Postcondition: the method returns the number of names found in the seating chart



//TODO: Write the numberOfStudents method


public int numberOfStudents(String[] names){





}


public static void main(String[] args)

{

//DO NOT ENTER CODE HERE

//CHECK THE ACTUAL COLUMN FOR YOUR OUTPUT

System.out.println("Look in the Actual Column to see your results");

}

}

Answers

Answer:

Wait what? Some of the words are mashed together...

In Scheme, source code is data. Every non-atomic expression is written as a Scheme list, so we can write procedures that manipulate other programs just as we write procedures that manipulate lists.
Rewriting programs can be useful: we can write an interpreter that only handles a small core of the language, and then write a procedure that converts other special forms into the core language before a program is passed to the interpreter.
For example, the let special form is equivalent to a call expression that begins with a lambda expression. Both create a new frame extending the current environment and evaluate a body within that new environment. Feel free to revisit Problem 15 as a refresher on how the let form works.
(let ((a 1) (b 2)) (+ a b))
;; Is equivalent to:
((lambda (a b) (+ a b)) 1 2)
These expressions can be represented by the following diagrams:
Let Lambda
let lambda
Use this rule to implement a procedure called let-to-lambda that rewrites all let special forms into lambda expressions. If we quote a let expression and pass it into this procedure, an equivalent lambda expression should be returned: pass it into this procedure:
scm> (let-to-lambda '(let ((a 1) (b 2)) (+ a b)))
((lambda (a b) (+ a b)) 1 2)
scm> (let-to-lambda '(let ((a 1)) (let ((b a)) b)))
((lambda (a) ((lambda (b) b) a)) 1)
In order to handle all programs, let-to-lambda must be aware of Scheme syntax. Since Scheme expressions are recursively nested, let-to-lambda must also be recursive. In fact, the structure of let-to-lambda is somewhat similar to that of scheme_eval--but in Scheme! As a reminder, atoms include numbers, booleans, nil, and symbols. You do not need to consider code that contains quasiquotation for this problem.
(define (let-to-lambda expr)
(cond ((atom? expr) )
((quoted? expr) )
((lambda? expr) )
((define? expr) )
((let? expr) )
(else )))
CODE:
; Returns a function that checks if an expression is the special form FORM
(define (check-special form)
(lambda (expr) (equal? form (car expr))))
(define lambda? (check-special 'lambda))
(define define? (check-special 'define))
(define quoted? (check-special 'quote))
(define let? (check-special 'let))
;; Converts all let special forms in EXPR into equivalent forms using lambda
(define (let-to-lambda expr)
(cond ((atom? expr)
; BEGIN PROBLEM 19
'replace-this-line
; END PROBLEM 19
)
((quoted? expr)
; BEGIN PROBLEM 19
'replace-this-line
; END PROBLEM 19
)
((or (lambda? expr)
(define? expr))
(let ((form (car expr))
(params (cadr expr))
(body (cddr expr)))
; BEGIN PROBLEM 19
'replace-this-line
; END PROBLEM 19
))
((let? expr)
(let ((values (cadr expr))
(body (cddr expr)))
; BEGIN PROBLEM 19
'replace-this-line
; END PROBLEM 19
))
(else
; BEGIN PROBLEM 19
'replace-this-line
; END PROBLEM 19
)))

Answers

What are you saying at the bottom?

Implement the above in c++, you will write a test program named create_and_test_hash.cc . Your programs should run from the terminal like so:
./create_and_test_hash should be "quadratic" for quadratic probing, "linear" for linear probing, and "double" for double hashing. For example, you can write on the terminal:
./create_and_test_hash words.txt query_words.txt quadratic You can use the provided makefile in order to compile and test your code. Resources have been posted on how to use makefiles. For double hashing, the format will be slightly different, namely as follows:
./create_and_test_hash words.txt query_words.txt double The R value should be used in your implementation of the double hashing technique discussed in class and described in the textbook: hash2 (x) = R – (x mod R). Q1. Part 1 (15 points) Modify the code provided, for quadratic and linear probing and test create_and_test_hash. Do NOT write any functionality inside the main() function within create_and_test_hash.cc. Write all functionality inside the testWrapperFunction() within that file. We will be using our own main, directly calling testWrapperFunction().This wrapper function is passed all the command line arguments as you would normally have in a main. You will print the values mentioned in part A above, followed by queried words, whether they are found, and how many probes it took to determine so. Exact deliverables and output format are described at the end of the file. Q1. Part 2 (20 points) Write code to implement double_hashing.h, and test using create_and_test_hash. This will be a variation on quadratic probing. The difference will lie in the function FindPos(), that has to now provide probes using a different strategy. As the second hash function, use the one discussed in class and found in the textbook hash2 (x) = R – (x mod R). We will test your code with our own R values. Further, please specify which R values you used for testing your program inside your README. Remember to NOT have any functionality inside the main() of create_and_test_hash.cc
You will print the current R value, the values mentioned in part A above, followed by queried words, whether they are found, and how many probes it took to determine so. Exact deliverables and output format are described at the end of the file. Q1. Part 3 (35 points) Now you are ready to implement a spell checker by using a linear or quadratic or double hashing algorithm. Given a document, your program should output all of the correctly spelled words, labeled as such, and all of the misspelled words. For each misspelled word you should provide a list of candidate corrections from the dictionary, that can be formed by applying one of the following rules to the misspelled word: a) Adding one character in any possible position b) Removing one character from the word c) Swapping adjacent characters in the word Your program should run as follows: ./spell_check
You will be provided with a small document named document1_short.txt, document_1.txt, and a dictionary file with approximately 100k words named wordsEN.txt. As an example, your spell checker should correct the following mistakes. comlete -> complete (case a) deciasion -> decision (case b) lwa -> law (case c)
Correct any word that does not exist in the dictionary file provided, (even if it is correct in the English language). Some hints: 1. Note that the dictionary we provide is a subset of the actual English dictionary, as long as your spell check is logical you will get the grade. For instance, the letter "i" is not in the dictionary and the correction could be "in", "if" or even "hi". This is an acceptable output. 2. Also, if "Editor’s" is corrected to "editors" that is ok. (case B, remove character) 3. We suggest all punctuation at the beginning and end be removed and for all words convert the letters to lower case (for e.g. Hello! is replaced with hello, before the spell checking itself).
Do NOT write any functionality inside the main() function within spell_check.cc. Write all functionality inside the testSpellingWrapper() within that file. We will be using our own main, directly calling testSpellingWrapper(). This wrapper function is passed all the command line arguments as you would normally have in a main

Answers

This question is way to long I don’t even understand what your asking

a predecessor of a work processor is​

Answers

Answer: Printing of documents was initially accomplished using IBM Selectric typewriters modified for ASCII-character input. These were later replaced by application-specific daisy wheel printers, first developed by Diablo, which became a Xerox company, and later by Qume.

Explanation:

Other Questions
i If a chemical system is at equilibrium, any change in the system will always result in an increase of which of the following? 1.The reaction that opposes the change 2. The concentration of the product3. The concentration of the reactants 4. The temperature of the system In the diagram, x is a negative number. and it is closer to zero than y.y is a positive number. which expression must be negative Which of these happens when you add the prefix mis- to the word spell?A. The prefix is followed by a hyphen.B. The last /is dropped.C. The word becomes misspell.D. The s is dropped from spell. 6.A. [tex]-\frac{1}{5}[/tex]B. [tex]\frac{x1}{5}[/tex]C. 5D. 5 Which equation represents a function? HELP ASAP PLEASE NO LINKS Question 1(Multiple Choice Worth 3 points)(07.04)The solution to 6x = 48 is x =05060708 A jar contains only pennies, nickels, dimes, and quarters. There are 27 pennies, 13 dimes, and 24 quarters. The rest of the coins are nickels. There are 87 coins in all. How many of the coins are not nickels? If n represents the number of nickels in the jar, what equation could you use to find n? Imagine riding on a sled, or in a wagon, or perhaps a school bus that stops quickly or suddenly. What happens to your body if you are not expecting the sudden stop? 9. Eating soup may may make you feel full longer than drinking a glass of water.falsetrue Select all the correct answers. A worker is holding a filled gas cylinder still. Which two sentences are true about the energy of the filled gas cylinder? It has no energy because its being held still. It has gravitational potential energy because of its height. Its atoms and molecules have thermal energy. It has motion energy because it will fall if let go. Its kinetic energy is being converted to potential energy. 1. The reciprocal parent function is translated 2 units left and 9 units down.Write an equation to represent the new function. this is for math n i dont get it, help pls :,) Another word for kinetic energycould beenergy.A. SafeB. MovingC. StoredD. Potential Hello!! I really need help pls answer as soon as your can P - 24 = 13 step explanation What does a equal? (This assignment is past due so please help me) The Georgia Department of Transportation maintains the state'sO public transit systems.O highways and bridges.airports and shipping ports.freight and passenger railroads. 7. List the three functions of banks.(learning about money) How are Mr. Hyde and Dr. Jekyll similar to each other?? helpppppppppppppppppppppppppppp............an object is moving with initial velocity of 5 m/s. After 10 seconds final velocity is 10 m/s. Calculate its acceleration.