One Of The Principles Of Green Engineering Is That Decisions Made Late In The
One of the principles of green engineering is that decisions made late in the design process generally have a negligible impact on long-term sustainability. Provide details of two major IT projects which illustrate this principle?
Write The Following Program In C . Test Your Code In The Main File.
Write the following program in C . Test your code in the main file.
C Code – Connect 4 Game: *Please Note That I Do NOT Have Access
C code – Connect 4 game: *Please note that I do NOT have access to the header file and therefore cannot provide this, access to this is not necessary in completing this question, as the completion of this question is expected to be done without this file. I assume that the content of the array is an integer: int board[COLS][ROWS] : the current state of the board. Each element in the array represents one square, 0 for empty, 1 for player 1, 2 for player 2. The first dimension (COLS) is the horizontal position on the board, starting at 0 on the left, COLS-1 on the right. The second dimension is the vertical position, starting at 0 at the TOP of the board, to ROWS-1 at the BOTTOM. Write a function for the following: winner(): Takes a board as input, and scans the board to see if anybody has won the game (has 4 tokens in a row either vertically, horizontally, or diagonally). If so, that player number (1 or 2) is returned, otherwise 0 is returned if nobody has won. This function will require many different checks to see if there are 4 non-empty squares of the same value in a row in multiple directions. An example of what the game looks like is shown below: This is the main function of the template file: #include #include #include #include #include #include “connect4.h” int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
PART1:Using The Protocol Definition And Example Code Create A Working Client Program For This
PART1:Using the protocol definition and example code create a working client program for this protocol. You will need to consult the rpcgen manual pages to determine which options to pass to the program PART2:Using the version 2 protocol specification again use rpcgen to create a client. This protocol is intended to follow the lecture example of a postage service, where the postoffice calculates a volume for you and then calculates the postage based on the volume and mass. The first procedure calculates the surface area and volume according to postoffice rules, (which are not the same as simple geometry), and returns them to you. The second procedure calculates the postage rate from the volume and the mass. PART3:Using the client you created for Part Two, by making calls with various values, determine the rules that the postoffice uses to calculate the surface area and volume. Once you understand how the volume is calculated you should also try to determine what rules the postoffice uses for the postage charge (as a hint both mass and volume play a part). You should create a log of the experiment to determine of the postoffice rules. !!!!!!!!!! THE ORDER OF PHOTOS IS BOTTOM TO TOP !!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!! PROGRAMMING LANGUAGE – C PROGRAMMING !!!!!!!!!!!! FROM BOTTON TO TOP – FIRST 3 PAGES ARE rpcgen MANUEL PAGES, THEN FROM 4TH PAGE IS CODE OF IDL VERSION 2 OF THE POSTAGE PROTOCOL AND THE LAST PAGE IS PROTOCOL DEFINATION FILE.
C Code – Connect 4 Game: Write A Function For The Following: Save_game(): Saves
C code – Connect 4 game: Write a function for the following: save_game(): Saves the current state of the game to the specified file. Please see example file and the template for the format of the save file. Below is a sample save file, which shows the structure of the file. An example of what the game looks like is shown below: This is the main function of the template file: #include #include #include #include #include #include “connect4.h” int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
2.1.1 Matrix The Matrix Class Consists Of Two Files: Matrix.h And Matrix.cpp. The Class
2.1.1 Matrix The matrix class consists of two files: matrix.h and matrix.cpp. The class has the following definition: matrix -size:int -mat:int** —————- matrix(file:string) ~matrix() operator (add:matrix*):matrix
Write A C Program According To The Following. You Are Only Allowed To Use
Write a C program according to the following. You are only allowed to use iostream and string. Define classes in .h files and implement in .cpp files
C Code – Connect 4 Game: *Please Note That I Do NOT Have Access
C code – Connect 4 game: *Please note that I do NOT have access to the header file and therefore cannot provide this, access to this is not necessary in completing this question, as the completion of this question is expected to be done without this file. Write a function for the following: load_game(): Reads a game file and restores the state into the given Game structure. An example of what the game looks like is shown below: The structure for the input file game.txt is shown below: This is the main function of the template file: int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
C Code – Connect 4 Game: *Please Note That I Do NOT Have Access
C code – Connect 4 game: *Please note that I do NOT have access to the header file and therefore cannot provide this, access to this is not necessary in completing this question, as the completion of this question is expected to be done without this file. Write a function for the following: setup_game(): Initialises a new game, by setting the values in the given Game struct. This means resetting all the squares to be empty (0), and setting up the player types for player 1 and player 2. The user should be prompted to enter whether each player will be a computer or human, and then the struct fields should be set accordingly. The player that goes first should be chosen randomly. An example of what the game looks like is shown below: Below shows the structure of the game file: This is the main function of the template file: #include #include #include #include #include #include “connect4.h” int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
C Code – Connect 4 Game: *Please Note That I Do NOT Have Access
C code – Connect 4 game: *Please note that I do NOT have access to the header file and therefore cannot provide this, access to this is not necessary in completing this question, as the completion of this question is expected to be done without this file. Write a function for the following: play_game(): Runs all the actual gameplay for the given game until a winner is determined or the game is quit. The general algorithm for this is to ask the player for a move (or calculate move automatically if computer player), add that move to the board, then check if anybody has won. If not, toggle the player and repeat. If the player enters ‘s’ or ‘q’ as their move, save the game or quit. Continue this until the board is full or somebody has won. An example of what the game looks like is shown below: This is the main function of the template file: #include #include #include #include #include #include “connect4.h” int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
C Code – Connect 4 Game: *Please Note That I Do NOT Have Access
C code – Connect 4 game: *Please note that I do NOT have access to the header file and therefore cannot provide this, access to this is not necessary in completing this question, as the completion of this question is expected to be done without this file. The complete question is to write a function for the following: (ie. The following paragraph is the COMPLETE question): computer_move(): Write a C code function that takes the current board state, the player whose turn it is, and an integer specifying how “smart” the computer is, and returns the column in which the computer will play its move. At level 0, this should be just a random column (that isn’t full). At level 1 it should be a little smarter and always win if it is possible to (check each column to see if playing there will win the game or not). At level 2 it will also check if it can block the other player from winning, and move there if there is no winning move. Levels 3 and above should be smarter again, and are up to you to implement (advanced functionality). An example of what the game looks like is shown below: Below shows the structure of the file – the game type I assume: This is the main function of the template file: #include #include #include #include #include #include “connect4.h” int main ( void ){ int option ; Game g ; // intitialise random seed srand(time(NULL)); while (( option = main_menu()) != -1 ){ if ( option == 1 ){ // setup a new game setup_game (
Write A C Program That Uses Array To Calculate The Factorial Of A Reasonable
Write a C program that uses array to calculate the factorial of a reasonable large number (say, up to 2,000).
Need Help With Java Program. Ok So Here Is The Instructions: Write A Java
Need help with java program. Ok so here is the instructions: Write a Java program that could help test programs that use text files. Your program will copy an input file to standard output, but whenever it sees a “$integer”, will replace that variable by a corresponding value in a 2ndfile, which will be called the “variable value file”. The requirements for the assignment: 1. The input and variable value file are both text files that will be specified in the command line. The way to run your program will thus be: java cs401hw1.GenTextFile input_file variable_value_file 2. As indicated above, input_file is just a regular text file. Your code should not generate output based on the names of the files, of course. 3. Similarly, variable_value_file is also a regular text file, but each line of the file is considered to be the value of the next variable. That is, the first line of the file is the value of $0, the 2nd line is the value of $1, the 3rd line is the value of $2, and so on. The value does not include the end-of-line. a. The java.util.Scanner class lets you easily read in the lines. Construct a File using the 2nd command-line argument, then pass this File to the constructor for Scanner 4. When a variable ($integer) is encountered in the input file, the corresponding line from the variable values file is displayed instead. a. The java.io.FileReader class has a read() method that will read one character at a time b. To convert the characters for integer into an actual integer value the static method Integer.parseInt(String) is helpful 5. A variable does not have to be used, or it may be used more than once. 6. Variable numbers are in the range of 0 to 9999. 7. Any two variables are separated by at least one character (so $1$2 won’t be in the input) 8. Comment each function to explain what the function does, as well as the overall program. 9. Choose good variable and function names 10. Name the constants you use Example: $0 POPULATION GROWTH (each * represents $1 person) $2 $3 variable value file: Town 1 1800 * Expected output: Town POPULATION GROWTH (each * represents 1 person) 1800 * Now Here is my code::: Code: import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class GenTextFile { public static void main(String[] args) throws Exception { File Valuefile = new File(args[2]); File Inputfile = new File(args[1]); List value = new ArrayList(5); Scanner Valuesc = new Scanner(Valuefile); Scanner Inputsc = new Scanner(Inputfile); while (Valuesc.hasNextLine()) { value.add(Valuesc.nextLine()); } while (Inputsc.hasNextLine()) { String []words=Inputsc.nextLine().split(” “); for(int i=0;i<words.length;i ) { if(words[i].contains("$")) { int index=Integer.parseInt(words[i].substring(1)); System.out.print(value.get(index) " "); } else { System.out.print(words[i] " "); } } System.out.println(); } } } however when I run it I keep getting this error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at cs401hw1.GenTextFile.main(GenTextFile.java:26) Can someone fix this
I Need A Ladder Logic (PLC) Code Which Can Be Executable By The Program
I need a ladder logic (PLC) code which can be executable by the program that I am having (Ladder logic program) because i will need to submit the code file along with a hand writing of it or a screen shot.
Question 1 [10 Marks] Differentiate Between The Following Relational Operators: 1.1 SELECT And PROJECT
Question 1 [10 marks] Differentiate between the following relational operators: 1.1 SELECT and PROJECT (2 marks) 1.2 UNION and INTERSECT (2 marks) 1.3 DIFFERENCE and PRODUCT (2 marks) 1.4 JOIN and EQUIJOIN (2 marks) 1.5 Left outer join and Right outer join (2 marks) Question 2 [30 marks] Refer to the un-normalised table below and normalise into the following: 1NF, 2NF and 3NF. Include explanations of 1NF, 2NF and 3NF. Module Department Lecturer Texts Economics IT Sam T1, T2 Statistics IT Sam T1, T3 EUC IT Anne T4 Maths Management Peter T1, T5 Marketing Management John T6 Question 3 [20 marks] Answer the following questions on Transaction Management and Concurrency Control: 3.1 A transaction is sequence of database operations that access the database. List and explain the six (6) states in which a transaction can exist. (12 marks) 3.2 Explain the techniques that transaction recovery procedures follow. (8 marks)
In Visual Basic Use Substring Function To Flip Users Name And One Other Function.
In visual Basic use substring function to flip users name and one other function. Example user types their name in a text box John J Jones and when they click a button it returns as Jones/John J. This must work for any name that the user types in the text box
CODE In JAVA Given An External File Which Contain The Following: Symbol Currency Dollar
CODE in JAVA Given an external file which contain the following: Symbol Currency Dollar USD US Dollar 1 INR Indian Rupee 63.72054 AUD Australian Dollar 1.259237 CAD Canadian Dollar 1.257802 Use the scan command in java to read the file and create a hash table like the following: USD 1 INR 63.72054 AUD 1.259237 CAD 1.257802
A = [1 2 3 4 5 6 7 8 9 10 11 12
A = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] In MATLAB. Use a ‘while loop’ to determine when the numbers have increased to at least 15 in the above array. Report answer to command window.
In Programming C, When I Open A File That Does Not Exist In Current
In programming C, when I open a file that does not exist in current working directory, how do I print an error to the program’s standard error stream and not the standard output? The program needs to exit cleanly with a return value of 1 if there’s an error, else a return value of 0 if it is successful. I wish not to use (which means functions like printf shall not be used) and only use low level I/O interface(including read() and write()). Sorry If you don’t understand my question, English is not my main language. Thanks in advance.
Users Connect Directly To A Server 3 Km Away. The Link Transmission Speed Rate
Users connect directly to a server 3 km away. The link transmission speed rate is 1 MBps. The propagation speed of the medium is 1000m/s. Calculate the nodal delay if a file of 2000 bytes is being transmitted. (Ignore queuing and processing delays)
Consider A Special Type Of Animal Known As An Ewwok That Reproduces Following The
Consider a special type of animal known as an Ewwok that reproduces following the rules below: An Ewwok dies six months after it is born. That is, if an Ewwok is born in month 0, it will die in month 6. An Ewwok gives birth to two Ewwoks every two months until it dies. That is, if an Ewwok is born in month 0, it will reproduce in months 2 and 4. It does not reproduce in month 6 or beyond. In each month, among all the Ewwoks that have been alive for exactly three months, there is one that dies. That is, if there are n (n > 0) Ewwoks that are born in month 0, one of them will die in month 3. Given an integer initial representing the number of Ewwoks born in month 0, and an integer m representing a month, your task in this question is to write a program that calculates and returns the number of Ewwoks alive in month m. For example, if there is 1 Ewwok born in month 0 (initial = 1): In month 1, there is 1 Ewwok. In month 2, there are 3 Ewwoks (2 are born by the initial Ewwok). In month 3, there are 2 Ewwoks (the initial Ewwok dies). In month 4, there are 6 Ewwoks (4 are born). In month 5, there are 5 Ewwoks (1 of the Ewwoks born in month 2 dies). In month 6, there are 15 Ewwoks (10 are born). In month 7, there are 14 Ewwoks (1 of the Ewwoks born in month 4 dies). In month 8, there are 39 Ewwoks (the remaining Ewwok born in month 2 dies; 26 are born). … You may assume that initial >= 0 and m >= 0.
The post One Of The Principles Of Green Engineering Is That Decisions Made Late In The appeared first on Smashing Essays.