GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

All of the following describe spectator ions EXCEPT?

All of the following describe spectator ions EXCEPT?

Read Details

Which of the following statements best describes weak acids?…

Which of the following statements best describes weak acids? 

Read Details

List and describe 5 major trends of Romanticism reflected in…

List and describe 5 major trends of Romanticism reflected in Romantic Music and provide examples from the listening that illustrate these trends. Please be specific and use complete sentences. 10 points total.  

Read Details

If you wanted to see the effect of men’s facial hair on wome…

If you wanted to see the effect of men’s facial hair on women’s ratings of attractiveness, you could randomly assign different groups of participants to two different groups: one group rates a photo of a male with a full beard, and the other group rates a clean-shaven male. What type of experimental design is this?

Read Details

Common age-related changes that alter pharmacokinetics in ol…

Common age-related changes that alter pharmacokinetics in older adults include? Select all that apply.

Read Details

Define and describe the sonata-allegro form and all of its s…

Define and describe the sonata-allegro form and all of its sections (this means its 3 main sections as well as all of the subsections therein). (Please use complete sentences and be specific.)

Read Details

24 points –> DO NOT USE Upload a .c source file containing…

24 points –> DO NOT USE Upload a .c source file containing all necessary functions to implement the following program. Your program will implement a translator for a fake language to be used in a video game. You will prompt the user to enter a sentence, then display its translation. To this end, you will construct the resulting translation by concatenating the individual translation of each word. Your program will be organized as follows: Function translate_sentence will handle all the steps of translating a whole sentence, passed as a string parameter, and return the resulting translation. Function translate_word will be used by the above to translate one word into our fake language and return a string representing the translation. In order to translate any given English word, our function will simply measure the number of characters that it contains, and then return a copy of a translation string that will be found in an array containing, for each length of word between 1 and 8 characters, the fake language word to be used as translation. Any word longer than 8 characters will be translated as “AFGURNM”. If an empty string “” is being translated, the table will contain its translation at index 0 as “”. Here is the table you should be using: 1 “A” 5 “CETER” 2 “DO” 6 “SOLURE” 3 “TER” 7 “KELTRAM” 4 “QORA” 8 “OKENUFAL” Hint: Start with writing a version of the program that only asks for one word at a time and translate it. Once you get this to work, you may attempt to read an entire sentence and translate it, but it will be more difficult. When you are ready to work on that part, use strtok in order to get, from a sentence entered by the user, an array containing strings representing each of the words found in the sentence. If you do not remember the strtok function from your reading assignment, you are free to lookup its manpage. Example of Execution for the single-word translation version (user input is in bold) Enter a single word to translate: hello Translation is: CETER Enter a single word to translate: welcome Translation is: KELTRAM Enter a single word to translate: Translation is: (the user entered nothing, the translation is an empty string “”) Example of Execution for the full-sentence translation version (user input is in bold) Enter a sentence to translate: hello people Translation is: CETER SOLURE Enter a sentence to translate: I do not know what it says Translation is: A DO TER QORA QORA DO QORA Enter a sentence to translate: Translation is: (the user entered nothing, the translation is an empty string “”)   Grading Criteria:  Your program will be evaluated based on the following criteria:  Rubric # Pts Additional Grading Notes The program compiles without compilation errors or warnings 3 Deduct 1 point per minor compilation error (e.g., typo, forgotten semi-colon, forgotten or extra curly braces or parentheses). If the program does not compile due to too many errors or due to an error that is non-trivial to fix (see above), then the whole assignment receives zero points. The program executes without crashing at runtime 3 Deduct one point for each use case that leads the program to crash (maximum 3) The translate_word function takes a string as parameter and returns a string representing its translation, according to the provided table. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_word function handles correctly strings longer than 8 characters. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_word function handles correctly the translation of empty strings. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_sentence function correctly calls strtok in order to obtain an array of strings each representing a word of the sentence passed as parameter. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_sentence function correctly iterate over each of these words and concatenate their translation (according to translate_word) in a string that is then returned. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The main method prompts the user to enter a single word, and translate it, until they enter an empty string. At that point, it prompts the user to enter a full sentence, and translate it, until they enter another empty string. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented Total 24  

Read Details

In reference to this problem: The Coco Co. is considering tw…

In reference to this problem: The Coco Co. is considering two mutually exclusive projects with the following cash flows. Which project would you pick, assuming the cost of capital is 10%? Simply specify A or B in your answer. Year Project A Project B 0 -$150,000 -$50,000 1  $120,000  $10,000 2  $30,000  $30,000 3  $35,000  $30,000  

Read Details

A biotech company has accepted a project that is expected to…

A biotech company has accepted a project that is expected to increase revenues by $[x] a year and cash expenses by $[y] a year. The project will require the purchase of some new equipment that will increase depreciation expenses by $[z] a year. Net working capital is also expected to increase by $[a] annually. The firm is in the [b]% marginal tax bracket. What is the change in operating cash flows? Round to the nearest whole number.

Read Details

Description of the Program to Write Upload a .c source file…

Description of the Program to Write Upload a .c source file containing all necessary functions to implement the following program. You will prompt the user to enter a sentence, and then display its translation. To this end, you will construct the resulting translation by concatenating the individual translation of each word. Your program will be organized as follows: Function translate_sentence will handle all the steps of translating a whole sentence, passed as a string parameter. It will return the resulting translation as a new string that is the concatenation of the result of calling translate_word on each word of the original sentence. The new string will have a maximum size of 5 times the size of the string we are translating. You will make sure that you do not concatenate into it more words than it can store (e.g., stop adding any more translations once you have one that does not fit in what space is left). Function translate_word will be used by the above function to translate one word and return a new string representing the translation. If the word is not known, then the new string will contain a copy of the original word.  In order to translate you are going to use a lookup table that will store, in a two-dimensional array, some words and their translation. For this exam, we will focus on translating the 10 digits from English to French. The table will look like the following (see below). You will return the original word except if you find it in the table, in which case you will return a new string containing the corresponding translation.      static const char * translationTable[NB_WORDS][2] = {        { “zero” , “zero” },        { “one” , “un” },        { “two” , “deux” },        { “three” , “trois” },        { “four” , “quatre” },        { “five” , “cinq” },        { “six” , “six” },        { “seven” , “sept” },        { “eight” , “huit” },        { “nine” , “neuf” }    }; Hint: Remember, or check the manpage of, strdup. This little function will make it easy to create new strings that are a copy of an existing one. Do not forget to deallocate all the memory that has been allocated. For instance, strdup returns a newly allocated string when you call it and it is your responsibility to deallocate it when it is no longer useful. Start with writing a version of the program that only asks for one word at a time and translate it. Once you get this to work, you may attempt to read an entire sentence and translate it, but it will be more difficult. When you are ready to work on that part, use strtok in order to get, from a sentence entered by the user, an array containing strings representing each of the words found in the sentence. If you do not remember the strtok function from your reading assignment, you are free to look at its manpage. Example of Execution for the single-word translation version (user input is in bold) Enter a single word to translate: one Translation is: un Enter a single word to translate: two Translation is: deux Enter a single word to translate: something Translation is: something Enter a single word to translate: Translation is: (the user entered nothing, the translation is an empty string “”) Example of Execution for the full-sentence translation version (user input is in bold) Enter a sentence to translate: one two three Translation is: un deux trois Enter a sentence to translate: one two testing one two three Translation is: un deux testing un deux trois Enter a sentence to translate: Translation is: (the user entered nothing, the translation is an empty string “”)   Grading Criteria:  Your program will be evaluated based on the following criteria:  Rubric # Pts Additional Grading Notes The program compiles without compilation errors or warnings 3 Deduct 1 point per minor compilation error (e.g., typo, forgotten semi-colon, forgotten or extra curly braces or parentheses). If the program does not compile due to too many errors or due to an error that is non-trivial to fix (see above), then the whole assignment receives zero points. The program executes without crashing at runtime 3 Deduct one point for each use case that leads the program to crash (maximum 3) The translate_word function takes a string as parameter and returns a string representing its translation, according to the provided table. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_word function handles correctly words that are not listed in its translation table. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_word function handles correctly the translation of empty strings. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_sentence function correctly calls strtok in order to obtain each word of the sentence to translate. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The translate_sentence function correctly concatenates the translation of each word (according to translate_word) in a newly allocated string that is then returned. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented The main method prompts the user to enter a single word, and translate it, until they enter an empty string. At that point, it prompts the user to enter a full sentence, and translate it, until they enter another empty string. 3 3 – Implemented according to requirements 2 – Mostly properly implemented 1 – Not properly implemented 0 – not implemented Total 24  

Read Details

Posts pagination

Newer posts 1 … 31,757 31,758 31,759 31,760 31,761 … 98,776 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top