Take a look at the following class here in c++.. class myDocument { public: myDocument(const char *docname); ~myDocument(); void print(); create an object for the above class that will opens a .txt file and remains open. utilize method print() to output the text in the .txt file to the screen.
Q: public class RandomNumbersWithASeed { // The specified seed public static final int SEED = 146; // T...
A: Modified code: import java.util.*;public class RandomNumbersWithASeed { public static final int S...
Q: Your organisation wants to shift away from utilising desktop apps and instead use services to access...
A: Organization shift away from utilising desktop apps , instead using services to access same function...
Q: In Python, create a function called function(A) that returns all of the following: - the steady-stat...
A: the steady-state gain of A as a scalar (if it exists, else the string 'DNE' if does not exist): def ...
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits. T...
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the...
Q: C Address filtering. How you would bypass MAC address filteri
A: MAC Address filtering
Q: What are the measures that can be taken by individuals and organizations to minimize the invasion of...
A: INTRODUCTION: Here we need to tell the measures that can be taken by individuals and organizations t...
Q: Write a program that print the following on the screen. Java Java Java Java Java Java Ja...
A: Java Code for above output is below:
Q: a Moral Issue on online platform Have you experienced on some of these online platform? How did you ...
A: Infrastructural Problems Though online learning doesn’t require huge buildings, big classrooms, ch...
Q: What other variables may be changed to keep the page size the same (and so avoid software rewrite)? ...
A: Introduction: To maintain the same page size, the following factors were altered:
Q: Explain what a "compensation action" is and why these activities may need ncluded in workflows using...
A: "compensation action" is and why these activities may need to be included in workflows using an exa...
Q: Several techniques have been proposed for a processor capable of decrypting encrypted data and syste...
A: Introduction: A central processing unit, often known as a central processor, main processor, or simp...
Q: Code for Greedy NFA Interpretation (Terminates on Failur
A: Code for Greedy NFA Interpretation (Terminates on Failure)
Q: Explain why distributed software systems are more difficult than centralised software systems, which...
A: Distributed systems: Distributed system is a environment in which various components are spread acr...
Q: Asap. 4. Define a method in JAVA that should take 4 numbers as the parameters and returns the averag...
A: Given: Define a method in JAVA that should take 4 numbers as the parameters and returns the average ...
Q: What are the advantages of using a non-blocking caching system? Computer science
A: Introduction: The following are the benefits of utilizing a non-blocking caching system: What are t...
Q: Make a suggestion on how the SimplelnterestCalculator service could be made RESTful.
A: We need to discuss, how the interest service calculator may be made restful.
Q: What is the best way to set up EIGRP named mode?
A: Introduction: Within EIGRP named mode, there are address-family configuration modes (i.e. the virtua...
Q: Convert NFA to Regular expression : q0 is the start and q2 is the final state δ(q0,a lamda) = q1, ...
A: Note - I used Y for lambda.
Q: What is the difference between a subsystem and a logical subdivision, and why is it important?
A: Introduction: The blocks are logically divided at the common plate joints. Arrows pointing inwards i...
Q: Your organisation wants to shift away from utilising desktop apps and instead use services to access...
A: While shifting the apps to the remotely instead of services, there might be many potential danger, l...
Q: In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval Will Bob necessa...
A: The answer as given below:
Q: Using examples, define a real-time operating system. Explain how it differs from a typical operating...
A: Real-Time Operating System A Real-Time Operating System, or RTOS, is a software component that rap...
Q: What advantages does a file system website have over a website that uses the http protocol?
A: Introduction: This query is based on a comparison between the file system and the http protocol. The...
Q: Code for Greedy NFA Interpretation (Terminates on Failure
A: Below the Code for Greedy NFA Interpretation (Terminates on Failure)
Q: 2. Sometimes, passing by value is called passing by __________. a) copy b) argument c) address ...
A: Sometimes, passing by value is called passing by argument Passing by reference implies the called fu...
Q: Write a Python program to take a string that contains a single pair of parenthesis, print the new st...
A: The solution to the given problem is below.
Q: Using C++ and MPI Using more than 2 processes, create a program that sends the same message sequent...
A: Solution Detail solution in c language:- // Using C language create an MPI program: Using more than ...
Q: 8. A 10-bit counter, clocked with an input frequency of 512 kHz, runs continuously. Every time it ov...
A: here we calculate the frequency of interrupt stream by using the given information , so the calculat...
Q: b) x(t) -6 3 4 6 . -3 -2
A: Matlab code for Fourier Seriesclear allclose all%Question a.%function for which Fourier series have ...
Q: 2. Explain any two structures of Operating Systems Services.
A: PROCESS MANAGEMENTA process is a program in execution: (A program is passive, a process active.)A pr...
Q: What is the output of the following program? void display(int n) {if (n<10) {display(n+2); cout ...
A: Here there is a void function called display having integer as parameter. According to the given que...
Q: In Google App Engine, how are static and resource files stored and accessed?
A: Intro Distributed storage can have static resources for dynamic web applications. The advantages of...
Q: Void methods can accept arguments. O True O False
A: We are going to learn if void methods can accept arguments.
Q: Should software engineers who work on safety-related system definition and development be profession...
A: Typical formal definitions of software engineering are: "research, design, develop, and test operat...
Q: 7. Consider the CFG S-> SS+ISS*la. Derive the string aa+a* from the given CFG and construct between ...
A:
Q: Explain what a "compensation action" is and why these activities may need to be included in workflow...
A: Let's see solution what's compensation action
Q: I'm wondering about the distinctions between commercial and personal cloud service providers. Examin...
A: Intro Data Storage Management: Cloud service providers must accomplish data storage management and ...
Q: Analyze the impact of 3D Printing in a global context
A: INTRODUCTION: Here we need to tell the impact of 3D Printing in a global context.
Q: WHERE CAN I FIND A WEB DATABASE APPLICATION?
A: Intro Web Database Application A Web database is a database that can be administered and accessed v...
Q: atn -3 2w b) x(t) 3. 1 -6 -3 -2 3 4 6 . kje
A: Matlab code for Fourier Seriesclear allclose all%Question a.%function for which Fourier series have ...
Q: 3. An easier way to compute the gcd in python is to use the function gcd in the math library. Using ...
A: code : import math print(math.gcd(12345,333)) Code Snapshot : Output : Answer : 3
Q: Create a scenario to aid in the development of tests for the wilderness weather station system.
A: Wild weather conditions station This contextual analysis depends on the product for a wild weather c...
Q: Isn't it true that different operating systems keep disc folders in different track locations on the...
A: Introduction: The system's file and directory management. Internally, the system uses nodes to keep ...
Q: For an object to be writable to an ObjectOutputStream, the object should be an instance of a class t...
A: I have given answer in next step.
Q: Computer Science ef get_syllable_count(poem_line: POEM_LINE, words_to_phonemes: PRONUNCIATION_DICT) ...
A: Given lines are ef get_syllable_count(poem_line: POEM_LINE, words_to_phonemes: PRONUNCIATION_DICT) ...
Q: Suppose list.add("Red") is an expression for adding an element to the list ArrayList. Which is the m...
A: According to the question the array list is used for to add the list by using data type which type o...
Q: Write a C++ program to add, subtract, mulitply and divide two fractions and display the result fract...
A: Note: The program result is in the fractional form not in the reduced/simplified form. If required k...
Q: Assume having a narrow low-pass channel that spans from a Frequency of 0Hz to 5400HZ, and a digital ...
A: Here we calculate the minimum frequency required for analog by using the given information and fill ...
Q: In a memory block, what does address space imply?
A: Introduction: The memory block comprises the block of addresses requested by the process, as well as...
Q: What is software re-engineering?
A: To define software reengineering.
Take a look at the following class here in c++..
class myDocument {
public:
myDocument(const char *docname);
~myDocument();
void print();
create an object for the above class that will opens a .txt file and remains open.
utilize method print() to output the text in the .txt file to the screen.
The constructor will be used to close the file. Lastly, if the file cannot be read, an exception must be thrown by the constructor.
ensure that function main() must provide and handles exceptions correctly.
Step by step
Solved in 2 steps
- The functionality of each file is described below:Class BankAccount This class has two instance variables:namebalanceCreate a constructor that takes two parameters to initialize the instance variables name and balance. The name must not be an empty string. The name also must not include any numbers or symbols. The balance must be zero or more to be used.If the name was an empty string a Value Error will be raised with the message “name cannot be empty”If the name contained numbers or symbols a Value Error will be raised with the message “name cannot include numbers or symbols”If the name was valid, it will be formatted properly and assigned to the instance variable. The valid name consists of alphabetical characters lowercase or upper case, may include space, underscore or hyphen.The name may consist of first, middle and last name.One way to validate the name is using Regular Expressions.Proper name format is the first character uppercase and the rest of the name lowercase character.…Programming Problem 3 – CycleFileInput Revisit the Cycle class in Module 3. Modify your application such that the properties will be read from a text file called “Cycle.txt”. Directions Examine your application for the class called Cycle. Add an appropriate throws statement in the main method. Create a reference to a File class with the appropriate name of a text file (Cycle.txt). Note: Cycle.txt was created in the previous assignment, CycleFileOutput. In your code, check that the text file does exist. Input the values from the file to memory. Close the file.InputOutput Class: write a program that carries out the following tasks: o Create an object of type PrintWriter and that writes into a file with the name greeting.txt. o Print the message "Hello, world!" on the file. o Close the file. o Open the same file again. o Read the message into a string variable (hint: use nextLine() method to read the text). o Print the message on the screen. AddNumbers Class: write a program that asks the user to input four floating-point numbers. Add all correctly specified values and print the sum when the user is done entering data. Use exception handling to detect improper inputs. For example, the user might enter letters instead of numbers. In this case, use the exception handling mechanism to print a proper message. (hint: use InputMismatchException) Don't forget to import java.util.*.
- Requested files: InClass02.java, input.txt Maximum number of files: 6 Create a simple java program that reads all the content in a .txt file, the user will enter the filename to be opened. In this case, the file will contain multiple lines of student details with each line containing a single student detail. Your task is to then create a student class that models the firstname, lastname, year of birth and gender of every student. The student class should further be able to assign every student created with a student number using a class variable[format is 2022000X, X is a number such as 1,2..] and be able to calculate the age of each student. Within the driver class add all the students read from file into an ArrayList and then print the first and last student in the list. You are additionally expected to deal with most common exceptions(See samples below) [HINT: DO NOT PROVIDE A PATH BUT RATHER ONLY OPEN THE FILE WITH RELATIVE PATH/FILENAME] Sample run 1: Enter filename:…Create a final program that meets the requirements outlined below. Create an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class: private string make private string model private string color private int year private int mileage Your program should have appropriate methods such as: constructor add a new vehicle remove a vehicle update vehicle attributes At the end of your program, it should allow the user to output all vehicle inventory to a text file.JAVA PPROGRAM ASAP Please Modify this program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Also, for test cases 1-4 it wants only to input Please enter the file name or type QUIT to exit: then input the file and display the Total number of words. For test cases 5 and 7 it wants to only to input Please enter the file name or type QUIT to exit then input input5.txt and then display File: input5.txt does not exist.\n then display Please enter the file name again or type QUIT to exit:\n then type input1.txt to display the total number of words or type quit to exit the program. For test case 6 it wants only to Please enter the file name again or type QUIT to exit:\n then type quit to exit the porgram. Chapter 9. PC #10. Word Counter (page 610) Write a program that asks the user for the name of a file. The program should display the number of words that the file contains. Input…
- Assessment Description Honors Students: Complete this assignment according to the directions provided in the "Honors Addendum," located in Class Resources. This activity has multiple parts. All parts must be completed prior to documentation submission. Part 1: Reading and Writing Text Files. In this activity, you will learn how to read and write text files using non buffered and buffered File I/O classes, then learn how to parse a String into tokens using the String split() method, and finally, how to handle exceptions using various approaches. Part 2: Reading and Writing JSON Files. In this activity, you will learn how to read, write, and serialize JSON files to and from Java Objects. Refer to the instructions within "Activity 4 Guide" to complete the assignment. APA style is not required, but solid academic writing is expected. This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful…Java Program ************This program must work in hypergrade and pass all the test cases.********** Chapter 9. PC #14. Word Separator (modified *** Read carefully ***) Write a program that prompts the user to enter a file name, then opens the file in text mode and reads it line by line. While entering the file name, the program should allow the user to type quit to exit the program. If the file with a given name does not exist, then display a message and allow the user to re-enter the file name. The file can contain one or more sentences. The program should accept as input each sentence in which all the words are run together, but the first character of each word is uppercase. Convert sentences to strings in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string StopAndSmellTheRoses.” would be converted to “Stop and smell the roses.” Sentences are separated by periods ('.'), exclamation marks ('!'), or…Write a back–end class called CSVFileLoader and save it in a file called CSVFileLoader.cpp. This class must have the following structure:Private MembersData Type Name Descriptionboolean cFileReadSuccessful This member will indicate if the file-read operation was successful. Private MethodsReturn Type Method Signature Descriptionint determineNumberOfColumns(string fileName) This method must determine the number of columns in the file.Insert a debug instruction that will display the number of columns as the method exits.void splitData(string line, TUTCell data[]) This method must split the line into separate elements and store each element in the data[] array.Insert a debug instruction that will display the data content of each element as it is inserted into data[] array.Public MethodsReturn Type Method Signature DescriptionTUTTable loadFile(string fileName, string subjectCode) This method must load the data of the file into a table object. Only students with the same subject code as…
- JAVA PROGRAM ASAP Please CREATE A program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Chapter 9. PC #14. Word Separator (modified *** Read carefully ***) Write a program that prompts the user to enter a file name, then opens the file in text mode and reads it line by line. While entering the file name, the program should allow the user to type quit to exit the program. If the file with a given name does not exist, then display a message and allow the user to re-enter the file name. The file can contain one or more sentences. The program should accept as input each sentence in which all the words are run together, but the first character of each word is uppercase. Convert sentences to strings in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string StopAndSmellTheRoses.” would be converted to “Stop and smell the roses.”…For this exercise, you will create 2 classes: InputOutput class and AddNumbers class. ⦁ InputOutput Class: write a program that carries out the following tasks:⦁ Create an object of type PrintWriter and that writes into a file with the name greeting.txt.⦁ Print the message “Hello, world!” on the file.⦁ Close the file.⦁ Open the same file again.⦁ Read the message into a string variable (hint: use nextLine() method to read the text).⦁ Print the message on the screen. ⦁ AddNumbers Class: write a program that asks the user to input four floating-point numbers. Add all correctly specified values and print the sum when the user is done entering data. Use exception handling to detect improper inputs. For example, the user might enter letters instead of numbers. In this case, use the exception handling mechanism to print a proper message. (hint: use InputMismatchException) Don’t forget to import java.util.*.<<Write in Java>> - Challenge 7 File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading the contents of one file, modifying the data into a code, and then writing the coded contents out to a second file. The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time, and add 10 to the character code of each character before it is written to the second file. - Challenge 8 Write a program that decrypts the file produced by the program in Programming Challenge 7. The decryption program should read the contents of the coded file, restore the data to its original state, and write it to another file