Define The Following Symbols As They Are Used In Flowcharting With Clear Expalanation In
Get college assignment help at Smashing Essays Define the following symbols as they are used in flowcharting with clear expalanation in own words
Problem 2. Consider The Following Definition Fun F(a, B, C) = A[b] C
Problem 2. Consider the following definition fun f(a, b, c) = a[b] c <= 1 Using Hindley-Milner type inference, determine the type of f.
Problem 1. Consider The Following Type Declarations TYPE A1 : Integer; A2 : Pointer
Problem 1. Consider the following type declarations TYPE A1 : integer; A2 : pointer to float; A3 : pointer to integer; T1 : structure { x : integer; } T2 : structure { x : A; T3 : structure { a : integer; T4 : structure { b : float; T5 : structure { a : pointer to T5; b : pointer T6 : structure { a : pointer to T6; b : pointer T7 : structure { a : pointer to T6; b : pointer T8 : structure { a : pointer to T7; b : pointer T9 : array [4][5] of T8; // array 4 rows 5 T10 : array [4][5] of T7; integer; } to T6; c : pointer to T7; } to T5; c : pointer to T5; } to T7; c : pointer to T9; } to T6; c : pointer to T10; } columns next : pointer to b : float; } a : integer; } Assuming the most permissive definition of structural equivalence, which types are structurally equivalent?
Solve The Following Recurrence Relation Using The Iterative Substitution Method. Assume That T(n) =
Solve the following recurrence relation using the iterative substitution method. Assume that T(n) = θ(1) for n ≤ 1 and T(n) for n > 1 is given. T(n) = nT(n − 1) 1
Consider The Following Variable Declarations In Conjunction To The Above Type Declarations VAR //
Consider the following variable declarations in conjunction to the above type declarations VAR // var declaration section s : T9; t : T9; u : T10; v : array [5][4] of T8; w, z : struct { int a; struct T5* next; }; x, y : struct { int a; struct T5* next; }; f : function of T9 returns int; g : function of T9 returns A; m : int; n : A; Assume that assignments between variables are allowed if the types of the variables are equivalent. For each of the following, list all type equivalence schemes under which the expression is valid. Consider name equivalence, internal name equivalence, and structural equivalence for each case. Assume that if two variables are equivalent under name equivalence, they are also equivalent under internal name equivalence. • s=t; • t=u; • u=v; • v=w; • w=z; • z=x; • m=f(s)• n=f(u)
This Program Will Be In Python. You Will Be Creating A Simple Cash Register
This program will be in Python. You will be creating a simple cash register program. Your program must have a welcome message for the user. Your program must have one class called CashRegister. Your program will have an instance method called addItem which takes one parameter for price. The method should also keep track of the number of items in your cart. Your program should have two getter methods. getTotal – returns totalPrice getCount – returns the itemCount of the cart Your program must create an instance of the CashRegister class. Your program should have a loop which allows the user to continue to add items to the cart until they request to quit. Your program should print the total number of items in the cart. Your program should print the total $ amount of the cart. The output should be formatted as currency. Be sure to investigate the locale class. You will need to call locale.setlocale and locale.currency.
This Program Will Be In Python. It Will Prompt The User For A Zip
This program will be in Python. It will prompt the user for a zip code and request a weather forecast from a 3rd party website. (I will not post the website because of policy so I will refer to it as “website”) Create a Python Application which asks the user for their zip code or city. Use the zip code or city name in order to obtain weather forecast data from (insert website here). Display the weather forecast in a readable format to the user. Use comments within the application where appropriate in order to document what the program is doing. Use functions including a main function. Allow the user to run the program multiple times to allow them to look up weather conditions for multiple locations. Validate whether the user entered valid data. If valid data isn’t presented notify the user. Use the Requests library in order to request data from the webservice. Use Try blocks to ensure that your request was successful. If the connection was not successful display a message to the user. Use try blocks when establishing connections to the webservice. You must print a message to the user indicating whether or not the connection was successful.
PYTHON You Need To Create A CLASS This Question Does NOT Need To Be
PYTHON You need to create a CLASS This question does NOT need to be updated. If you cannot figure it out from the information below please move on. Thank you B. (243 pts total) Write a Python program that plays a guess-the-number game with magic lists. The program will play as many games as the user wants. In each game, the program asks the user to think of a number between 1 and 31, inclusive. Then the program presents the user with 5 lists of numbers and asks the user if their number is in the list. Based on the user’s answers of ‘y’ or ‘n’, the program guesses the user’s number. The program works with 5 files, each file contains 16 integers, one number per line. The filenames are: magicList1.txt, magicList2.txt, magicList3.txt, magicList4.txt, and magicList5.txt The program is divided into a NumberGuesser class and a main function. The NumberGuesser class Create a class named NumberGuesser. (5pts) The class has 3 methods: (5pts) Create a createList constructor of the NumberGuesser class. (15pts) The constructor does the following tasks: Loop 5 times to: (5pts) Open one magcListN.txt file each time through the loop. (10pts) Read the 16 numbers from the file into a list. This is the same as in (15pts) Store the list into an instance attribute named magicLists, which is also a list. (15pts) By the time the constructor is finished, there should be a magicLists instance attribute which contains 5 magic lists. Write a new printAList method that does the following tasks: (5pts) Receive a magic list as input argument (10pts) Have a nested loop to print the numbers in the list as 4 rows by 4 columns. This is the same as in lab5.py. (15pts) Convert the lab5’s checkList function into a checkList method. (5 pts) def CheckListFunction(magic_list): for i in range(len(magic_list)): print(‘{0:>3}’.format(magic_list[i]),end=”) if (i 1)%4==0: print() present=input(‘Is your number in the list above? y/n: ‘) return presen Text files: magicList1.txt 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 magicList2.txt 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31 magicList3.txt 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 magicList4.txt 2 3 6 7 10 11 14 15 18 19 22 23 26 27 30 31 magicList5.txt 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 lab5.py The method does the following tasks: Loop 5 times to: (5pts) Call the printAList method to print one magic list at a time (10pts) Loop to keep asking the user whether their number is in the list, until you get a ‘y’ or ‘n’ answer (15pts) If the answer is ‘y’, add the value corresponding to the current magic list to the total. (30pts) You’ll need to figure out how to tell the computer what the corresponding value is. Example: 16 is the corresponding value for magic list 1, 8 is the corresponding value for magic list 2, etc. 5 pts extra credit: if you can figure out how to add the corresponding value without using an if statement. The checkList method returns the total. (5pts) The main function Write the main function, which is not part of the NumberGuesser class. (5 pts) The main function will: Create an instance (an object) of the NumberGuesser class. (15pts) Loop as long as the user wants to play. You decide how the user indicates that they want to play again, such as answer ‘y’ or ‘n’, or any 2 choices that make sense.(15pts). Inside the loop: Call the checkList method to get the total. (15 pts) If the total is non-zero, then print the user’s number If the total is 0, then print an error message (10pts) Don’t forget to call the main function so that the program will run. (10pts) C. (10 pts) Test your output by running several games, one after another. Text files: magicList1.txt 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 magicList2.txt 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31 magicList3.txt 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 magicList4.txt 2 3 6 7 10 11 14 15 18 19 22 23 26 27 30 31 magicList5.txt 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
Write A Javascript Function. Using This Table Data The Output ConvertTable(tableData) Should Display This
Write a javascript function. using this table data the output convertTable(tableData) should display this use this template below: const tableData = [ [“first_name”, “last_name”, “city”, “state”], [“Elisabeth”, “Gardenar”, “Toledo”, “OH”], [“Jamaal”, “Du”, “Sylvania”, “OH”], [“Kathlyn”, “Lavoie”, “Maumee”, “OH”] ] //Code goes here convertTable(tableData)
1. Decribe The Concept Of Command Redirection As It Relates To Outputting The Stdout
1. Decribe the concept of command redirection as it relates to outputting the stdout or the stderr of a command to another location, such as a text file 2. Give a demonstration of redirecting stdout to a file from a command line statement .
1. Give An Overview As To How GRUB2 Is Different From GRUB 2. Decribe
Get college assignment help at Smashing Essays 1. Give an overview as to how GRUB2 is different from GRUB 2. Decribe Systemd and what us servie units and target units?
First, Launch NetBeans And Close Any Previous Projects That May Be Open (at The
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called “CheckString” (without the quotation marks) according to the following guidelines. ** Each method below, including main, should handle (catch) any Exceptions that are thrown. ** ** If an Exception is thrown and caught, print the Exception’s message to the command line. ** Write a complete Java method called checkWord that takes a String parameter called word, returns nothing, and is declared to throw an Exception of type Exception. In the method, check if the first character of the parameter is a letter. If it is not a letter, the method throws an Exception of type Exception with the message of: “This is not a word.” Write a complete Java method called getWord that takes no parameters and returns a String. The method prompts the user for a word, and then calls the checkWord method you wrote in #1 above, passing as a parameter the word the user provided as input. Make sure the getWord method handles the Exception that may be thrown by checkWord. Write a complete Java method called writeFile that takes two parameters: an array of Strings (arrayToWrite) and a String (filename). The method writes the Strings in the arrayToWrite array to a text file called filename (the parameter), with each String on a separate line. Write a complete Java method called readFile that takes a String as a parameter (filename) and returns an ArrayList of Strings (fileContents). The method reads the text file identified by the filename parameter and populates the ArrayList with an element for each line in the text file. In your main method, do the following in the order specified: Call the getWord method you wrote in #2 above and print the result to the command line. Create an array of Strings called testData and populate it with at least three elements. Call the writeFile method you wrote in #3 above passing the array you created in #5.2 and the String “data.txt”. Call the readFile method you wrote in #4 above to read the file you wrote in #5.3. Assign the result of readFile to an ArrayList variable in main called fileContents. Write a loop to print the contents of the fileContents ArrayList to the command line. For this PA you can use any of the IO classes. For example, you can use either FileWriter or PrintWriter, and for reading Strings probably you will want to use BufferedReader. There should be a total of four methods in additional to main: checkWord, getWord (which calls checkWord), writeFile, and readFile. Also, the PA instructions say that the methods including main should handle exceptions. When coding up the solution experiment with try-catch within methods vs having the methods throw an exception and then catching it in main. Be sure to test your code for throwing a FileNotFoundException (it is an easy exception to test). If you are not sure or want to experiment with different io classes, you can import them all using: import java.io.*; There are several implementation approaches. Below in only one example framework/outline which uses FileWriter and BufferedReader. Please feel free to experiment with other approaches. 3 // PA method #1 checkWord which is called by getWord method public static void checkWord(String word) throws Exception { // word.charAt(0) can be used to access the first letter of the string variable word // Character.isLetter( call charAt in here) tests if the first letter is a letter // the above can be used in an ‘if’ condition // if the first letter is not a character, throw a new Exception // for example: throw new Exception(“Does not start with a letter”); } // PA method #2 getWord – returns the user entered string if valid public static String getWord() throws Exception { // Declare a local scanner // Prompt the user to enter a word // Think about using a loop to give the user multiple opportunities to correctly enter a string // Read user input into a string // Call checkWord method passing the string as a parameter // for example call: checkWord(aString); // if checkWord throws an exception, here I’m just going to throw that exception to main // another alternative is to put the try/catch here in this method instead // Return the string to main if a valid string } // PA method #3 writeFile, two parameters the string array and the file name public static void writeFile(String[] arrayToWrite, String filename) throws IOException { // you can use a FileWriter or PrintWriter object, below I’m using FileWriter // Create a FileWriter object FileWriter fileWordStream = new FileWriter(filename); // Use a for loop to write string elements in arrayToWrite to fileWordStream // In the for loop, use the write method to write each of the strings to the file // for example: fileWordStream.write(arrayToWrite[i]); // In the loop use the lineSeparator method to put each string on its own line // for example call: fileWordStream.write(System.lineSeparator()); // close the file } // PA method #4 readFile, parameter file name and returns an ArrayList of strings public static ArrayList readFile(String filename) throws FileNotFoundException, IOException { // Declare local ArrayList of type string called fileContents // Create a new File object using filename parameter // for example: File aFile = new File(filename); // Check if the file exists, if not throw a new exception // for example: if (!aFile.exists()) { throw new FileNotFoundException(“File not found”); } // Create a new BufferedReader object BufferedReader fileWordStream = new BufferedReader(new FileReader(filename)); // use a while loop and the readLine method to read each string (on its own line) from the file // for example: while((aString = fileWordStream.readLine()) != null) { fileContents.add(i, aString); i ; } // close the file // return the filled ArrayList to main } // main method public static void main(String[] args) { // create a string with literal values to write to the file // for example: String[] testData = {“cat”, “dog”, “rabbit”}; // Create an ArrayList of strings for storing the above data when read from a file // for example: ArrayList fileContents = new ArrayList(); // Declare a string variable containing the file name “data.txt” try { // Call getWord method, assign the returned string to a variable and display it to the screen 4 // Call writeFile method, pass in testData array and the file name as parameters // for example: writeFile(testData, filename); // Call readFile method, pass in the file name as a parameter, returns filled Arraylist // for example: fileContents = readFile(filename); // Printout the contents of the ArrayList using a loop // catch exceptions – make sure to catch the FileNotFoundException // for example: } catch (FileNotFoundException excpt) { System.out.println(“FileNotFoundException: ” excpt.getMessage()); } catch (IOException excpt) { System.out.println(“IOException: IO problem – Aborting program.”); excpt.printStackTrace(); } catch (Exception excpt) { System.out.println(“Exception: ” excpt.getMessage()); } An example run: the user has entered “testing” which is valid, it starts with a letter. The contents of the string array (testData) is written to a file, and then read from the file into the ArrayList (fileContents) which is then printed to the screen. run: Please enter a word: testing The word is: testing cat dog rabbit BUILD SUCCESSFUL (total time: 7 seconds) Here is an example run where an integer is entered instead of a word. A while loop is used to keep the user in the loop until they enter a valid string: run: Please enter a word: 78 This is not a word. Please enter a word: 59 This is not a word. Please enter a word: testing The word is: testing cat dog rabbit BUILD SUCCESSFUL (total time: 21 seconds) Here is a run that tests the exception thrown by the readFile method. I passed the readFile method a different file name as a parameter (not data.txt). Of course, that file name was not found which throws the exception ‘FileNotFoundException’ which drops into the first catch block in main: run: Please enter a word: testing The word is: testing FileNotFoundException: File not found BUILD SUCCESSFUL (total time: 4 seconds) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
How Is X Windows Configured By Default? Where Would You Find The Confuguration File
How is X windows configured by default? Where would you find the confuguration file for X windows should you need to edit it manually
In C ! Please Don’t Use Code That’s Already Been Posted. Keep It Simple. Thank
In C ! Please don’t use code that’s already been posted. Keep it simple. Thank you! A Text-based Game Goals Design a game with pointer-linked spaces Use object-oriented programming concepts Requirements This is the final project and you will be able to design and implement a one-player, text-based game where the player can move through spaces to get items and accomplish goals. You have the freedom to decide what kind of them you would like to create for your game as long the requirements below are met. Space class The game requires a Space class, which represents the space the player can be in. The Space class must be an abstract class that will have pure virtual functions (you can add not pure virtual functions, too). Inside the Space class, there must be at least 4 Space pointers: top, right, left, and bottom. Use the class to create a game with the structure of linked space. (You are free to add more Space pointers to the Space class, but must have at least 4 Space pointers) Note: Even if your structure is linear, such as a train, you still have at least 4 pointers in the Space class Any unused pointers need to point to NULL. The game must have at least 3 derived classes that are derived from the Space Each representing a different type of space, and need to have a special action for the player to interact with. It can be opening the door to another space, or maybe attack the monster, or turn on the light switch, or sing a song to please the king. The game must have at least 6 spaces. Gameplay The game must have a theme. It can be a crime-solving theme, a fantasy game. The game must also have a goal for the player, so the player can complete the goal to achieve victory. The game must keep track of which space the player is in. It can be in a form of visualized space, by printing the map out and indicate where the player is, or printing text describing where the player is at and what adjacent space is around the player’s space. You must create a container for the player, to carry “items”. The container must have a capacity limit. The game must contain some items for the player to obtain in the game and one or more of these items must be required as part of the solution to accomplish game’s goal, such as a key to open a locked door, etc. The game must have a time limit, which limits the amount of time/steps/turn the user can take before losing the game. The following are some notable examples of the time limit: Step limit that limits the number of times the user can switch spaces. Health system which decreases the player’s health point from space to space, and maybe some painkillers scattered around the spaces. Note: make sure you give enough steps to allow the game to perform testing. Again, the user must be able to interact with parts of the space structure, not just collecting items to complete the game. Interface At the beginning of the game, the goal of the game must be declared and printed to let the player know the goal of the game. The game cannot contain free-form input. An example of free-form input would be to type out “kitchen” to go to the kitchen space in the game. It is tedious and counter-intuitive. The game must provide the user a menu option for each scenario of the game. You are not required to have a printed map to visualize space, a text-based game is sufficient. But, it would be great to have a printed map, it is easier to interact with, and it’s cool to show a cool game with a map to friends and family. Extra Credit Best theme 10%: the graders will have the option to give extra credit for the most creative, interesting and well-designed games in the class. What you need to Submit All the program files including header and source files (.cpp/.hpp) makefile Your reflection pdf file Important: Put all the files in a single .zip file and submit it on Canvas. GRADING Programming style and documentation 10% : The program runs smoothly as intended on the flip, no segmentation fault, no memory leak, all files are put into a zip file, the code is well-commented. Create basic game structure 50%: Create at least 6 spaces of at least 3 different types (the abstract and derived classes): 20% Correctly use at least 4 pointers for each space to link them together: 10% Implement a goal for the player to achieve (sequence of actions to win and exit): 10% Keep track of player status: 10% Meet the advanced requirement 20%: Properly implement the step limit: 10% Properly implement the interaction of player and space structures: 10% Create a menu function to run the game: 10% Reflection document 10%: include the design description, test plan and results, comments about how you solved the problems
Please Answer The Following Questions With Full Paragraphs: How Are Clustering And Network Load
Please answer the following questions with full paragraphs: How are clustering and Network Load Balancing similar? How are clustering and Network Load Balancing Different? During your research, be sure to explore the difference between active-active and active-passive HA solutions. Pick either clustering or NLB and briefly describe a scenario where this technology would be the better choice of the two for an HA solution. In your given scenario, why is one of these two HA technologies (clustering and NLB) a better choice or fit? Please be sure to validate your opinions and ideas with citations and references in APA format.
Please Answer The Following Questions With Full Paragraphs: What Are Three Situations When Recursion
Please answer the following questions with full paragraphs: What are three situations when recursion is the only option available to address problems? What is an event-driven program and what is it used for? When a user runs a program in a text-based environment, such as the command line, what determines the order in which things happen? Please be sure to validate your opinions and ideas with citations and references in APA format.
Write Matlab Program To Solve Y’=sqrt(1 y^2); Y(0)=1; 0
write matlab program to solve y’=sqrt(1 y^2); y(0)=1; 0<t<1; with n points, explicit trapezoidal, plot in same graph the exact error and the richardson error as a function of time, plot the upper bound of error as a function of time. (Assume E=(h^3/6)y'''(c))
ASSIGNMENT: Answer All The Following Questions Below: 1: List Three Things You Know About
ASSIGNMENT: Answer all the following questions below: 1: List three things you know about IT Audit and the audit process. Explain how and why it is valuable to you or your organization. 2: List three things you know about IT Compliance and enforcing controls. Explain how and why it is valuable to you or your organization. 3: List three things you know about IT Governance. Explain how and why it is valuable to you or your organization.
5 1 4 5 5 2 1 5 3 1 4 4 2 2
5 1 4 5 5 2 1 5 3 1 4 4 2 2 3 1 4 4 4 2 Optimal page replacement: ? page faults LRU: ? page faults FIFO: ? page faults of frame 3
Java And C Is Preferred But C Will Also Be Accepted, I Have No
Java and C is preferred but C will also be accepted, I have no other information on the following question, try to answer it within best of your capabilities. Thank you PART 1 of the question: 1 Written Part [40pts] Note: pages refer to the 2nd edition of the textbook. Exercise 1: exercise 7.41 page 310 [8pts] 1. Prove that any comparison-based algorithm to sort 4 elements requires 5 comparisons. 2. Give an algorithm to sort 4 elements in 5 comparisons. Exercise 2: exercise 7.42 page 310 [8pts] 1. Prove that 7 comparisons are required to sort 5 elements using any comparison-based algorithm. 2. Give an algorithm to sort 5 elements with 7 comparisons. Exercise 3: exercise 7.48 page 310 (first 2 questions) [8pts] We are given an array that contains N numbers. We want to determine if there are two numbers whose sum equals a given number K. For instance, if the input is 8, 4, 1, 6 and K is 10, then the answer is yes (4 and 6). A number may be used twice. Do the following: 1. Give an O( ) algorithm to solve this problem. 2. Give an O(N logN) algorithm to solve this problem. (Hint: Sort the items first. After that is done, you can solve the problem in linear time.) Exercise 4 : [8pts] Suppose that the splits at every level of quicksort are in the proportion 1- a to a, where 0 < a < 1/2 is a constant. Show that the minimum depth of a leaf in the recursion tree is approximately: -log(n) / log(a) and the maximum depth is approximately -log(n)/log(1-a) (don't worry about integer round-off). Exercise 5 : [8pts] The running time of quicksort can be improved in practice by taking advantage of the fast running time of insertion sort when its input is "nearly" sorted. When quicksort is called on a subarray with fewer than k elements, let it simply return without sorting the subarray. After the top-level call to quicksort returns, run insertion sort on the entire array to finish the sorting process. Argue that this sorting algorithm runs in O(nk n log(n/k)) expected time. How should k be picked, both in theory and in practice? Programming Part : Sorting Algorithms [60pts] The goal here is a comparative experimental study, in terms of running time, of the following 4 sorting algorithms. Insertion sort Mergesort Quicksort Quicksort as shown in exercise above (we will call this algorithm Quick-insertion) 1. Implement the 4 algorithms above within the same program. The input and output are described as follows. Input: 2 parameters N (number of random naturals to sort) and K (used by Quick-insertion).Output: Display the list of N randomly generated naturals. For each algorithm display the list of sorted numbers corresponding running time. 2. Find the pair of values (N,K) where : (a) Quick-insertion outperforms all the other algorithms. (b) Insertion sort outperforms all the other algorithms. (c) Quicksort outperforms all the other algorithms. Marking scheme 1. Readability : 10pts 2. Compiling and execution process : 10pts 3. Correctness : 40pts
Hi, I Am Trying To Get The Following C Code To Run On Visual
Hi, I am trying to get the following C code to run on visual studio 14, it only runs on 11. Can someone rewrite it to run on 14, I don’t know what to do, thanks. The issue is with rand, however I don’t know what to replace it with. . Here is a visible version of the image (Correction*)
The post Define The Following Symbols As They Are Used In Flowcharting With Clear Expalanation In appeared first on Smashing Essays.