
Concept explainers
a.
Path:
To represent the path of the file, first identify the type of the environment in the
- The path is a string or a sequence of characters separated by a forward or backward slash that contains the specified location of file.
- The path can be represented in two ways,
- Absolute path:
- It specifies the path of the file step by step, from the root of the directory.
- The path of the file starts from the root directory.
- Absolute path names can be represented with a forward slash (/) or backward slash (\) based upon the type of operating system.
- Relative path:
- It specifies the name from the current working directory.
- Relative path names can be represented with two dots (..) preceded by the forward (/) or backward slash (\)based upon the type of operating system.
- Absolute path:
The following diagram represents the directory tree structure on windows environment.
- Relative path of the file is represented by separating the directories, subdirectories and files by a backward slash (/) in windows environment.
- The relative path name starts from the current working directory.
- Note that here -
- The current working directory is C:\WINDOWS\System
a.

Explanation of Solution
Relative path for QTImage.qtx file:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as:
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “WINDOWS”, the subdirectory “System” is located.
- Up to this path C:\WINDOWS\System, it acts as the current working directory.
- Under the “System” subdirectory, the nested sub directory “QuickTime” is located.
- Under the “QuickTime” directory, the image file “QTImage.qtx” is located.
- Therefore, the file “QTImage.qtx” is located in the current working directory and there is no need to use dots to represent the path of the file.
Hence, the relative path of the file is “QuickTime\QTImage.qtx”.
Explanation of Solution
b.
Relative path for calc.exe file:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as:
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “WINDOWS”, the executable file “calc.exe” is located.
- Since the current working directory is C:\WINDOWS\System, but the file “calc.exe” is located above one level from the current working directory.
- Hence, use two dots (..) followed by the backward slash to represent the relative path of the file.
Hence, the relative path of the file is “..\calc.exe”.
Explanation of Solution
c.
Relative path for letters directory:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as:
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “My Documents”, the directory “letters” is located.
- Here the current working directory is C:\WINDOWS\System, but the directory “letters” is located under the “My Documents”.
- It needs to go back to the root directory because the current working directory and parent directory of “letters” are under the root directory “C:\”
- The root directory “C:\” is above two levels from the current working directory.
- Hence, use two dots (..) followed by the backward slash to represent the parent directory “WINDOWS”.
- Use two dots (..) followed by the backward slash to represent the root directory “C:\”.
Hence, the relative path of the directory is “..\..\My Documents\letters”.
Explanation of Solution
d.
Relative path for proj3.java file:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as -
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “My Documents”, the sub directory “csc101” is located.
- Under the sub directory “csc101”, the program source file “proj3.java” is located.
- Here the current working directory is C:\WINDOWS\System, but the file “proj3.java” is located under the directory “csc101” which is under “My Documents”.
- It needs to go back to the root directory because the current working directory and parent directory of “proj3.java” are under the root directory “C:\”.
- The root directory “C:\” is above two levels from the current working directory.
- Hence, use two dots (..) followed by the backward slash to represent the parent directory “WINDOWS”.
- Use two dots (..) followed by the backward slash to represent the root directory “C:\”.
Hence, the relative path of the file is “..\..\My Documents\csc101\proj3.java”.
Explanation of Solution
e.
Relative path for adobep4.hlp file:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as:
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “WINDOWS”, the subdirectory “System” is located.
- Up to this path C:\WINDOWS\System, it acts as the current working directory.
- Under the “System” subdirectory, the file “adobep4.hlp” is located.
- Therefore, the file “adobep4.hlp” is located in the current working directory and there is no need to use dots to represent the path of the file.
Hence, the relative path of the file is “adobep4.hlp”.
Explanation of Solution
f.
Relative path for WinWord.exe file:
From the above directory structure,
- To specify a relative path, the directories must be separated by the backward slash (\) on windows environment and it starts from the current working directory.
- Here, the root directory starts with the C drive (C:\).
- Under the root directory “C:\”, there are three parent directories such as:
- WINDOWS
- My Documents
- Program Files
- Under the parent directory “Program Files”, the sub directory “MS Office” is located.
- Under the sub directory “MS Office”, the executable file “WinWord.exe” is located.
- Here the current working directory is C:\WINDOWS\System, but the file “WinWord.exe” is located under the “MS Office” which is under the parent directory “Program Files”.
- It needs to go back to the root directory because the current working directory and parent directory of “WinWord.exe” are under the root directory “C:\”.
- The root directory “C:\” is above two levels from the current working directory.
- Hence, use two dots (..) followed by the backward slash to represent the parent directory “WINDOWS”.
- Use two dots (..) followed by the backward slash to represent the root directory “C:\”.
Hence, the relative path of the file is “..\..\Program Files\MS Office|Winword.exe”.
Want to see more full solutions like this?
Chapter 11 Solutions
COMPUTER SCIENCE ILLUMIN.-TEXT
- Draw a context diagram for this scenario: You are developing a new customer relationship Management system for the BEC store, which rents out movies to customers. Customers will provide comments on new products, and request rental extensions and new products, each of which will be stored into the system and used by the manager for purchasing movies, extra copies, etc. Each month, one employee of BEC will select their favorite movie pick of that week, which will be stored in. the system. The actual inventory information will be stored in the Entertainment Tracker system, and would be retrieved by this new system as and when necessary.arrow_forwardWrite a complete Java program named FindSumAndAverage that performs the following tasks in 2-D array: Main Method: a. The main() method asks the user to provide the dimension n for a square matrix. A square matrix has an equal number of rows and columns. b. The main() method receives the value of n and calls the matrixSetUp() method that creates a square matrix of size n and populates it randomly with integers between 1 and 9. c. The main method then calls another method named printMatrix() to display the matrix in a matrix format. d. The main method also calls a method named findSumAndAverage() which: • Receives the generated matrix as input. • Calculates the sum of all elements in the matrix. • Calculates the average value of the elements in the matrix. • Stores these values (sum and average) in a single-dimensional array and returns this array • e. The main method prints the sum and average based on the result returned from findSumAndAverage()). Enter the dimension n for the square…arrow_forwardThe partial sums remain the same no matter what indexing we done to s artial sum of each series onverges, * + s of each series to the series or show 12. (1)+(0)+(0)+(+1)+ 17, " (F) + (F) + (F)(F)(- 18. 19. 1 #20. (三)+(三)-(三)+(3) 20 (9)-(0)-(0)-- 10 +1 2.1+(男)+(男)+(罰)+(鄂 9 T29 x222-끝+1-23 + -.... Repeating Decimals 64 Express each of the numbers in Exercises 23-30 as the m integers. 23. 0.23 = 0.23 23 23... 24. 0.234 = 0.234 234 234. 25. 0.7 = 0.7777... 26. 0.d = 0.dddd... where d is a digit natio of own s converges or * 27. 0.06 = 0.06666.. 28. 1.4141.414 414 414... 29. 1.24123 = 1.24 123 123 123... 30. 3.142857 = 3.142857 142857. Using the ath-Term Test In Exercises 31-38, use the ath-Term Test for divergence to show that the series is divergent, or state that the test is inconclusive 8arrow_forward
- CPS 2231 Computer Programming Homework #3 Due Date: Posted on Canvas 1. Provide answers to the following Check Point Questions from our textbook (5 points): a. How do you define a class? How do you define a class in Eclipse? b. How do you declare an object's reference variable (Hint: object's reference variable is the name of that object)? c. How do you create an object? d. What are the differences between constructors and regular methods? e. Explain why we need classes and objects in Java programming. 2. Write the Account class. The UML diagram of the class is represented below (10 points): Account id: int = 0 - balance: double = 0 - annualInterestRate: double = 0.02 - dateCreated: java.util.Date + Account() + Account(id: int, balance: double) + getId(): int + setId(newId: int): void + getBalance(): double + setBalance(newBalance: double): void + getAnnualInterestRate(): double + setAnnualInterest Rate (newRate: double): void + toString(): String + getDataCreated(): java.util.Date +…arrow_forwardTHIS IS NOT A GRADING ASSIGNMENT: Please only do lab 2.2 (bottom part of the first picture) For that Lab 2.2 do: *Part 1 (do the CODE, that's super important I need it) *Part 2 *Part 3 I also attached Section 2.5.2 which is part of the step 1 so you can read what is it about. Thank you!arrow_forwardTHIS IS NOT A GRADING ASSIGNMENT: Please only do lab 2.2 (bottom part of the first picture) For that Lab 2.2 do: *Part 1 *Part 2 *Part 3 I also attached Section 2.5.2 which is part of the step 1 so you can read what is it about. Thank you!arrow_forward
- can you please give me: * the code (step 3) *the list file (step 5) *and answer step 6 Thank youarrow_forward# Find the error# Why will the following code not print out a list of contact namesphoneBook = {'Doe, Jane' : '843-000-0000' ,'Doe, John' : '843-111-1111' ,'Smith, Adam' : '843-222-2222' ,'Jobs, Steve' : '999-333-3333' ,}for contact in phoneBook.values():print(contact)arrow_forward# Find the error:# The following code creates an empty dictionary and attempts to add a record# Why will the following code not create a new dictionary entry as intended?phoneBook = {}phoneBook{'Jobs, Steve'} = '999-111-1111'arrow_forward
- Select all the possible polar representations of the vector that is obtained from rotating where by Zrot Ź x = 3e² T= 3п 8 Hint: Consider the negative angle that is equivalent to the positive angle of the rotated vector. 0arrow_forwardCharacter Analysis If you have downloaded the source code you will find a file named text.txt on the Chapter 08 folder. Write a program that reads the file's contents and determines the following: The number of uppercase letters in the file The number of lowercase letter in the file The number of digits in the file The number of whitespace characters in the filearrow_forwardWrite a program that reads the text file's contents and calculates and outputs the following in this order: • The number of words in the file • The number of lines in the file • The number of uppercase letters in the file • The number of lowercase letters in the file • The number of digits in the file • The number of letter H's in the file • The number of whitespace characters in the file NOTE: Your program should include at least one try-except error handling statement block. Your program should also validate any input that could cause your program to crash. I'm Henery The Eighth, I Am! Henery The Eighth, I Am, I am!I got married to the widow next door,She's been married seven times before.And ev'ryone was a Henery,She wouldn't have Willie or a Sam.I'm her eighth old man named Henery,Henery the Eighth, I Am!Second verse same as the first!I'm Henery The Eighth, I Am! Henery The Eighth, I Am, I am!I got married to the widow next door,She's been married seven times before.And…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





