Coordinate the other source files, main calls functions

Assignment Help Basic Computer Science
Reference no: EM13935231

1. Copy the directory lab5 from the cis18b directory. This is the directory where you will do your work for Module 5 lab. In this directory are some source files that work together to allow the user to multiply 2 integers (yes, the code is a no-brainer but this isn't a programming class). The source files are:

main.cpp: coordinate the other source files, main calls functions in input.cpp, mul.cpp, and output.cpp
input.cpp: get 2 integers from the user
mul.cpp: multiply the 2 integers
output.cpp: print the product
Except for main.cpp, each source file has its own header file

2. Write a makefile that:
· Builds an executable called mul.exe from the C++ source files, when you type: make  and at the end of the build, prints the text: filename is built (where filename is the name of the executable)

· Allows you to compile each source file individually by typing: make filename.o
· Has 4 macros, for: the compiler name, compiler flags, file dependencies, and name of the executable Set the compiler name to g++ , set the compiler flags to print all warnings, set the executable to mul.exe

3. Turn on the script utility to capture your screen output
4. Run make to create the output.o file. Then do a listing of the directory to show that only this file was created.
5. Run make to build the executable. [Outside of script, just for "fun" you can run the executable by typing its name on the command line]
6. Use one command line to delete from the file input.cpp the line:
cout << "Read in " << n1 << " and " << n2 << endl;
You should not have to use vim or a text editor, and you should not have to use a line number to select the line.

7. Build the executable again, except this time have the executable be named myApp.exe
8. Use echo to print an explanation of why the build in step 7 is shorter than the build in step 4.
9. Exit out of script and save the script output file
10. Modify the makefile so that it has the following additions:
· when you type: make clean
it will delete all object files and the executable file (only source files should be left)
· when you type: make list
it will list all the .cpp files
· when you type: make
it will rebuild if necessary, and copy the up-to-date version of the executable to your home directory
· when you type: make rebuild
it will recompile all source files and rebuild the executable, regardless of whether the files are up-to-date or not
11. Start the script utility again to capture screen output
12. Create 2 empty files in the current directory called clean and list
13. Run: make list (only .cpp files should be listed)
14. Run: make clean (all object and executable files removed)
15. Run: make (new executable built and copied to home directory)
16. Run a command to show that the executable is at your home directory
17. Run: make rebuild (new executable rebuilt, even though all files are up to date)
Do not run make recursively to solve this step. This means the makefile should not have a rule that runs make.
18. Exit out of script and save the script output file and your makefile

Module 6

1. Go to the lab5 directory (where you have your C++ files from Module 5)
2. Turn on the script utility to capture your screen output
3. Create a bin subdirectory and copy the executable file to the bin subdirectory
4. Run make to remove all .o files and executable file from the current lab5 directory
5. Run the tree command to show the directory tree of the lab5 directory
6. Create a tar file of all the .c files
7. Add the .h files to the tar file
8. Add the bin subdirectory to the tar file
9. Do a long listing of the tar file to see its size
10. Compress the tar file
11. Do a long listing of the compressed tar file to see its size
12. Create a subdirectory called lab5Copy. Copy the compressed tar file to the lab5Copy directory, and then go to the lab5Copy directory
13. Use one command, reconstruct your lab5 directory from the tar file
14. Run the tree command of the reconstructed directory to show that it's identical to the original lab5 directory.
15. Exit out of script.

You should now have a script output file of Module 5 and a script output file of Module 6

16. Remove any control characters, typing errors, command errors, and/or extra commands in both files.
17. Make a copy of the 3 files that you created for this lab: the 2 script output files (of module 5 and module 6) and your makefile (from module 5) , and rename all 3 copies with extension .txt
18. Prepare the 3 .txt files for text editing on Windows.
19. Use one command to create a compressed tar file of all 6 files (3 original files and 3 copies with .txt extension). Name the tar file lab5-6, and with the correct filename extension to show that it's a compressed tar file.

20. Transfer the tar file to your local system and upload it to Catalyst

Reference no: EM13935231

Questions Cloud

What are some challenges both anticipated and unexpected : What are some challenges (identify three to five), both anticipated and unexpected, when completing the partnership tax return? What solutions can you provide to those challenges?
Fraudulent accounting described affect the current ratio : How did the fraudulent accounting just described affect the current ratio?
Using the concept of incremental analysis : Using the concept of incremental analysis, expand on Nick's response of Why do you want to know?
What key events represent the romantic view of leadership : Go to www.gsk.com, What key events represent the romantic view of leadership and what events describe the external control perspective leadership
Coordinate the other source files, main calls functions : Copy the directory lab5 from the cis18b directory. This is the directory where you will do your work for Module 5 lab. In this directory are some source files that work together to allow the user to multiply 2 integers (yes, the code is a no-brain..
What are three main types of rna, and what are their roles : Compare and contrast DNA synthesis in prokaryotes and eukaryotes. What are the three main types of RNA, and what are their roles?
An employee writes an anonymous blog on her experience : An employee writes an anonymous blog on her experience at Sears that provides insights into the company's strategy for success.
Why do molecular biologists use restriction enzymes : What is the difference between type I and type II restriction endonucleases and why are type II restriction endonucleases more useful for molecular biologists than type I restriction endonucleases?
Analyze the major steps related to planning the audit : Go to the PCAOB Website (http://pcaobus.org/Pages/default.aspx) to review the internal control requirements (Auditing Standard No. 5). Next, analyze the major steps related to planning the audit

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Information system to support the business

As a part of the final project for this course you will be doing research for a medium size (approximately 200 employees) widget manufacturing company to do a complete evaluation of their computer needs and make recommendations to them about an in..

  What fraction of bus cycles are available for dma transfer

Estimate the maximum transfer rate if DMA is used. For DMA access, assume one word is transferred for each bus cycle, and ignore any setup or status-checking time. Your answer from part B should be helpful for this calculation. million words /sec

  A tcp/ip ethernet network

Canyon College plans to offer night classes for business school students, paralegal students, and nurses, in five remote cities. Their plan is to have professors offer the classes from the main site, and to use video conferencing and multimedia optio..

  Convert each section using the formula

Convert each section using the formula b * 2^2 + b * 2^1 + b* 2^0 and you get the octal number 766. Similarly, 2^4 = 16 so to convert a number from binary to hexadecimal all that is necessary is to start at the right of the number,

  Give minimal dfa that performs as a mod

Give minimal DFA that performs as a mod-3 1's counter, i.e, outputs a 1 each time the number of 1's in the input sequence is a sequence is a multiple of 3.

  Powerpoint presentation—training program design

PowerPoint Presentation-Training Program Design

  In 1966 the supreme court ruled in its miranda v arizona

in 1966 the supreme court ruled in its miranda v. arizona decision that law enforcement has an obligation to advise a

  Are there names or numbers used in internet service addressi

Are there names or numbers used in Internet Service Addressing (websites, and other Internet applications)? Explain your answer.

  Making the world a different place

Paper Review of "Making the World (of Communications) a Different Place" - David D. Clark, Craig Partridge, Robert T. Braden, Bruce Davie, Sally Floyd, Van Jacobson, Dina Katabi, Greg Minshall, K.K. Ramakrishnan, Timothy Roscoe, Ion Stoica, JohnWr..

  Explain advantages of having componentized system

Explain some of the advantages of having componentized system. For instance, What occurs if the microwave breaks?

  Explain network security plan and make modifications

Please review your previous work including that of last week with your Network Security Plan and make revisions and modifications as necessary based on our discussions and research up to this point. This is a plan that would be submitted to your c..

  Method in phone charger class

Which of the following would be a more appropriate choice for a method in a PhoneCharger class

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd