Computers and Technology
Fill in each blank with the correct answer/output.int[] vals = {7,5,3,9,0,37,93,16,68,6,99};System.out.println(vals[vals[1]+vals[4]]);
Create a class called Hangman. In this class, Create the following private variables: char word[40], progress[40], int word_length. word will be used to store the current word progress will be a dash representation of the the current word. It will be the same length as the current word. If word is set to apple, then progress should be "" at the beginning of the game. As the user guesses letters, progress will be updated with the correct guesses. For example, if the user guesses p then progress will look like "pp" Create a private function void clear_progress(int length). This function will set progress to contain all dashes of length length. If this function is called as clear_progress(10), this will set progress to "". Remember that progress is a character array; dont forget your null terminator. Create the following protected data members: int matches, char last_guess, string chars_guessed, int wrong_guesses, int remaining. Create a public function void initialize(string start). This function will initialize chars_guessed to a blank string, wrong_guesses to 0. Set remaining to 6. Use strcpy() to set word to the starting word passed as start (You can use start.c_str() to convert it to a character array). Set word_length to the length of word. Call clear_progress in this function.
Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bits memory address references given as word addresses. 0x03, 0xb4, 0x2b, 0x02, 0xbf, 0x58, 0xbe, 0x0e, 0xb5, 0x2c, 0xba, 0xfd For each of these references identify the binary word address, the tag, and the index given a direct mapped cache with 16 one-word blocks. Also list whether each reference is a hit or a miss, assuming the cache is initially empty.
Create a program that generates a report that displays a list of students, classes they are enrolled in and the professor who teaches that class. There are 3 files that provide the input data: 1. FinalRoster.txt : List of students and professors ( S: student, P: professor) Student row: S,Student Name, StudentID Professor row: P, Professor Name, Professor ID, Highest Education 2. FinalClassList.txt: List of classes and professor who teach them (ClassID, ClassName, ID of Professor who teach that class) 3. FinalStudentClassList.txt: List of classes the students are enrolled in. (StudentID, ClassID) The output shall be displayed on screen and stored in a file in the format described in FinalOutput.txt You will need to apply all course concepts in your solution. 1. Student and Professor should be derived from a super class "Person" 2. Every class should implement toString method to return data in the format required for output 3. Exception handling (e.g. FileNotFound etc.) must be implemented 4. Source code must be documented in JavaDoc format 5. Do not hard code number of students, professors or classes. Submit source Java files, the output file and screenshot of the output in a zip format