Write a program that replaces each line of a file with its reverse. For example, if you run java Reverse HelloPrinter.java then the contents of HelloPrinter.java are changed to retnirPolleH ssalc cilbup )sgra ][gnirtS(niam diov citats cilbup wodniw elosnoc eht ni gniteerg a yalpsiD // ;)"!dlrow ,olleH" (nltnirp.tuo.metsyS }
Q: Suppose that you are implementing a program to write a string “CSE 110” in a binary file. Java…
A: For the given functions, we need to find the number of bytes that will be written by each of these…
Q: Write a program that allows the user to create and maintain a list of contacts in a file contact…
A: Code: #include <iostream>#include <fstream> using namespace std; void printList() {…
Q: Write a program that allows the user to create and maintain a list of contacts in a file named…
A: Actually, program is an executable software that runs on a computer.
Q: Given the following block of code: file="/values.dat" while IFS=, read -r value1 value2 value3; do…
A: IFS is used when you're reading several variables with read: So in this peace of code, we are…
Q: Write a program that prompts the user for an input file name, reads all words from the input file,…
A: Program in C++: #include <iostream>#include <fstream>#include <cstdlib>#include…
Q: You are a cyber investigator, your task is to write a python program that can read file signatures…
A: Here we write python program to read file and store signature in list:…
Q: Create a simple java program that reads all the content in a .txt file, the user will enter the…
A: Answer:
Q: Write a program called ReverseText.exe that takes two file names as command-line arguments. The…
A: In this C program, I have created a function that will read the first file and append the content…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Given code: #Header file import csv #Getting the input file file = input() #Initializing frequency…
Q: Write a program that reads a file one character at a time and prints out how many times each of the…
A: File name: “Vowels.java” import java.io.FileInputStream; import java.io.FileNotFoundException;…
Q: Write a program that replaces all occurrences of a word with anew word in all the files under a…
A: Program: //include the required header files import java.io.*; import java.util.Scanner;…
Q: 3. Write a java program that will parse the 13th digits Student ID only from a file. Student ID…
A: Below is the complete solution with sample Program and Output Images in detail for the given…
Q: Write a program that reads a text file named as "input.txt" and performs the following operations:…
A: The ask is to write a C program to do the following: - read a file named input.txt - read the input…
Q: Write a Python program that reads student-csv.py file and find each student average. For example,…
A: To create student-csv.py we need to shape the below data : - Joe;80;73;88;90;60;75;72…
Q: Modify the Total program so that it shows the average, not the total of the inputs. Total.java 1…
A: A modified “Total” program is as follows, File name: “Total.java” import java.io.File; import…
Q: Write a program that use the existing file, read the integers and display them in reverse order…
A: import java.util.*; class main { // Recursive function to print from N to 1static void…
Q: Write an address book program that stores your contacts' names and their email addresses. The names…
A: Answer: I have done in python programming language. and also i have attached code as well as code…
Q: Write a program that reads lines of characters froma text file and writes each line as a UTF string…
A: The java program is: import java.io.*; class Exercise17_04 { public static void main(String[]…
Q: In JAVA, write a program in a single file that: Main: Creates 10 random doubles, all between 1 and…
A: Programming instructions: In the main method, create an array of size 10, and then store 10 random…
Q: Your client owns a bookstore, and they need to process an input file containing the titles of all…
A: please read the bold lines and comments in code carefully. change the path according to your…
Q: Write a program that first reads in the name of an input file and then reads the input file using…
A: def read_file(filename): file = None # open file try: file = open(filename) except: print("Unable…
Q: from Big Java 6th. Edition. Ch.11 P11.12: the capacitor is represented by the equation…
A: PROGRAM: //Importing header file import java.io.*; import java.util.*; import…
Q: write a program that replace each line of a file with its reverse. for example, if you run: java…
A: Actually, the code has given below:
Q: Write a program that reads a text file named as “input.txt” and performs the following operations:…
A: while (ptr != NULL) { //Starting with Capital Letter if (ptr[0] >= 'A'…
Q: Write a program that replaces each line of a file with its reverse. For example, if you run java…
A: The required java program is provided below in the next step.
Q: Write a Python program that reads each line of an input file temperatures.txt that consists of a…
A: inputfile=open('temperatures.txt','r') #Opening the temperatures.txt…
Q: Write a program that prompts the user for an input file name, reads all words from the input file,…
A: Create a objects of input and output file. Then read input file name Then open input file using…
Q: Write a program that will sequentially list numbers from 0 to 50, changing its color depending on…
A: Step 1 : Start Step 2 : Define a function delay() to print the numbers in an interval of 1 second.…
Q: Write a program that finds all occurrences of a word in all the filesunder a directory, recursively.…
A: Program: //include the required header files import java.io.*; import java.util.Scanner;…
Q: Write a program that allows the user to create and maintain a list of contacts in a file named…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program to read and store four student’s name and their Salaries, sort them into an order…
A: Write a program to read and store four student’s name and their Salaries, sort them into an order…
Q: Write a python program that uses a dictionary to assign “codes” to each letter of the alphabet. For…
A: The, code has given below:
Q: Write a program in C that stores 1000 random integers (100 - 1000), one on each line, in a file…
A: #include <stdio.h>#include <stdlib.h>#include <time.h>int main(){ FILE…
Q: Create a simple java program that reads all the content in a .txt file, the user will enter the…
A: The code is given below.
Q: Please help me code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; adding…
A: Let's say you have a file, data.txt, which contains the following ASCII text: apples oranges pears…
Q: Write a program that prompts the user to enter afile name and displays the occurrences of each…
A: Since programming language is not mentioned in the question, we will answer this question in the…
Q: Write a program called ReverseText.exe that takes two file names as command-line arguments. The…
A: In this C program, I have created a function that will read the first file and append the content…
Q: Exercise 4: Solve the programming exercise P10.8 on Page 535 on the book. Write a program that…
A: java code is given below
Q: Write a program that receives a filename as user input. The file is structured as multiple lines…
A: Note: - As the programming language is not mentioned to write the program so I am using python to…
Q: Suppose you have a file Monster.txt that lists the Monster Energy Drinks the company offers, on one…
A: Code: #include <iostream>#include <fstream>#include <string.h>#include…
Q: Here is the code that needs to be debugged, Ive done most of it but I think there is a problem in…
A: The ask is to debug the given program which is trying to compare two files and find out which one is…
Q: Write a program to do the following: - 1) Read the file Mydata.txt which includes unlimited number…
A:
Q: Write a program that replaces each line of a file with its reverse. For example, if you run java…
A: JAVA program that replaces each line of file with its reverse import java.util.*;import…
Q: Write a program that will countthe number of characters, words, and lines in a file. Words are…
A: import java.io.*; import java.util.*; public class Exercise12_13 { public static void…
Q: dent data that consists of a Student number, First name, Surname, and average assignment mark.…
A: Write a Java application that allows a user to enter student data that consists of a Student…
Q: write a program to encrypt outgoing messages and decrypt incoming messages using a Vigenere Cypher.
A: Below is the program:
Step by step
Solved in 3 steps with 2 images
- Write a program that replaces all occurrences of a word with anew word in all the files under a directory, recursively. Pass the parameters fromthe command line as follows:java Exercise18_31 dirName oldWord newWordwrite program code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; Then add their corresponding elements and produce an output file “output.txt”. If the number of elements are not equal, fill the elements of the smaller file up with “0” s. Sample output: Elements of the “Data1.txt”: 3 5 7 8 9 Elements of the “Data2.txt”: 45 11 Elements of the “Output.txt”: 48 16 7 8Please help me code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; adding their corresponding elements produces an output file “output.txt”. If the number of elements are not equal, fill the elements of the smaller file up with “0” s. Sample output: Elements of the “Data1.txt”: 3 5 7 8 9 Elements of the “Data2.txt”: 45 11 Elements of the “Output.txt”: 48 16 7 8
- Write a python program that uses a dictionary to assign “codes” to each letter of the alphabet. For example: codes = { ‘A’ : ‘%’, ‘a’ : ‘9’, ‘B’ : ‘@’, ‘b’ : ‘#’, etc . . .} Using this example, the letter A would be assigned the symbol %, the letter a would be assigned the number 9, the letter B would be assigned the symbol @, and so forth. The program should open a specified text file (text.txt), read its contents, then use the dictionary to write an encrypted version of the file’s contents to a second file. Each character in the second file should contain the code for the corresponding character in the first file. Write a second program that opens an encrypted file and displays its decrypted contents on the screen. Below is the required dictionary. ➔➔➔➔➔➔➔➔ # Encryption and decryption are inverse of one another CODE =…You are a cyber investigator, your task is to write a python program that can read file signatures from a file and save them into a list. Each file signature is an element of your list. Then, try to find out if there is a JPG file in there. If there is a JPG file, print out a True on screen. (File Signature for JPG file is: FF D8 FF DB) The input file is: FSCS360_Midterm_Exam_Part2.txtin java Declare a FileOutputStream named outStream and a PrintWriter named dataFS. Ex: If the input is leek.txt 37.5, then leek.txt contains: 37.5 kilograms of leeks 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import java.io.IOException; public class LeekFileOutput { publicstaticvoidmain(String[] args) throwsIOException { Scannerscnr=newScanner(System.in); StringleekFileName; doubleleekQuantity; /* Additional variable declarations go here */ leekFileName=scnr.next(); outStream=newFileOutputStream(leekFileName); dataFS=newPrintWriter(outStream); leekQuantity=scnr.nextDouble(); dataFS.println(leekQuantity+" kilograms of leeks"); dataFS.close(); } }
- Implement a program that identifies a person based on their DNA. $ python3 dna.py databases/large.csv sequences/5.txt Lavender [https://drive.google.com/drive/folders/1uEjrE0VNWG5HZYcmsMD8ZJUWgeW2whK6?usp=sharing]Download the file that you're going to use for this problem. Extract this file and you will see a directory of sample databases and a directory of sample sequences. Specification In a file called dna.py, implement a program that identifies to whom a sequence of DNA belongs. The program should require as its command-line argument that name of a CSV file containing the STR counts for a list of individuals and should require as its second command-line argument the name of a text file containing the DNA sequence to identify. If your program is executed with the incorrect number of command-line arguments, your program should print an error message of your choice. If the correct number of arguments are provided, you may assume that the first argument is indeed a filename of a…Twist this assembly code, but this time a program asks the user to write anything and the written text/string must be saved in the file created in the this code.GIVEN CODE: .model small.stack 60h.data filepath db "UC",0filepath2 db "USC\USCMain",0filepath3 db "USC\USCTalamban",0filepath4 db "USC\USCSouth",0filepath5 db "USC\USCNorth",0;for uc banfilepath6 db "USC\USCSouth\BSECE ",0filepath7 db "USC\USCSouth\BSCPE",0create db "USC\USCSouth\BSCPE\Cruz.doc",0handle dw ?data db "My Name is Cruz, Juan"data_size=$-offset data .codemov ax,@datamov ds,ax mov ah,39hlea dx, filepathint 21h mov ah,39hlea dx, filepath2int 21h mov ah,39hlea dx, filepath3int 21h mov ah,39hlea dx, filepath4int 21h mov ah,39hlea dx, filepath5int 21h mov ah,39hlea dx, filepath6int 21h mov ah,39hlea dx, filepath7int 21h mov ah, 3chmov cx, 0mov dx, offset createmov ah, 3chint 21hmov handle, ax mov bx, handlemov dx, offset datamov cx, data_sizemov ah, 40hint 21h mov ah,4chint 21h endJAVA: Use natural split to split the bonus_txt file, then use natural merge to merge the two resulting files back together. What is the value at index 100? bonus.txt file 200 998 744 735 402 22 387 547 944 76 50 85 395 603 121 453 552 27 658 576 961 975 436 235 111 691 870 392 391 340 660 947 522 664 771 575 275 847 222 992 68 763 975 14 226 763 114 108 502 997 430 654 730 857 443 60 339 500 910 961 824 571 835 196 152 170 78 927 537 857 690 282 955 962 244 144 287 749 536 268 975 81 199 744 669 31 999 905 384 537 753 228 344 609 134 363 819 774 859 479 945 406 120 265 732 371 445 488 210 907 576 805 916 14 344 579 780 686 7 844 742 225 938 172 348 513 122 153 955 565 404 362 101 899 38 218 68 283 686 860 654 159 618 259 690 646 580 69 910 362 450 373 342 398 547 336 539 745 224 972 585 95 146 673 19 459 500 906 520 278 208 459 430 721 131 960 988 705 134 941 440 743 847 601 18 118 945 537 178 23 739 167 354 268 963 248 934 844 664 886 128
- Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write a program to insert thestatement package chapteri; as the first line for each Java source file underthe directory chapteri. Suppose chapter1, chapter2, . . . , chapter34are under the root directory srcRootDirectory. The root directoryandchapteridirectory may contain other folders and files. Use the followingcommand to run the program:java Exercise12_18 srcRootDirectoryin JAVA write an ADT for a library management system which stores the title (string), author (string), ISBN (string), list price (positive integers), edition (numbers), and publisher (string). Then implement the method swap but remove the assumption that the ith and jth items in the list exist. Throw an exception ListindexoutOfBoundsException ifiorj isoutofrangeJava Program ASAP Here is a FileSorting program to read a CSV file, sorts a list of integers on each row, and prints a comma separated list of sorted integers on the console. Modify ir by removing or changing the main method os it passes all the test cases. import java.io.File;import java.io.FileNotFoundException;import java.util.ArrayList;import java.util.Scanner; public class FileSorting { private static final String FILENAME = "somefile.txt"; public static void main(String[] args) { // read integers from input file Scanner fileReader; ArrayList<Integer> numbers = new ArrayList<>(); try { fileReader = new Scanner(new File(FILENAME)); while(fileReader.hasNextLine()) { numbers.add(Integer.parseInt(fileReader.nextLine().trim())); } fileReader.close(); }catch(FileNotFoundException fnfe){ System.out.println("File " + FILENAME + " is not…