CMPTR
3rd Edition
ISBN: 9781337681872
Author: PINARD
Publisher: Cengage
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
In Java programming
Write the code to print out a customer report. Your code must read each customer from a file, populate the object, place the object in a linked list, and display the data from the linked list.
Use the customer object name from
Customer customer = new Customer ( “ customer name” );
Assume you have opened a file and read a line into the customer object.
Write the signature line for this method
Write the line of code that will write the object to a linked list
Write the line of code that will print the customer object properties. Be sure to include a textual description of each property.
Linear list directory structures have the disadvantage that you must search an entire linked list to ensure that a new file doesn't match a name already in the directory.
Question 2 options:
True
False
Write a LinkedList holding CGPA of students to a text file "information". Use the appropriate LinkedList type. You can use any file writing class in Java other than object class.
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- T/F Q. By default if any regular file is created, the number of link is displayed as 1.arrow_forwardQ4 You have just finished a Python script called "transfer.py" and decide to produce and keep a hash of the file. Six months later, you produce the hash again and discover it is different. Assuming you did not touch the file "transfer.py", what does a different hash suggest to you?arrow_forwardWhat exactly does it mean when something is deleted using the delete operator?arrow_forward
- using c++ create a linked list so that the linked list can read content from a binary file and write the list back to a binary file. The binary file to read should look something like this: 9 -3 5 2 6 8 it should have a list of integers to read into your linked list, NOT a list of commands like: L1.insertTail(5);arrow_forwardIn Java programming Write the code to print out an order for an individual customer. Your code must read the order header from a file, populate the object, and display the data from the object. Then you must read each line item from a file, populate the object, place the object in a linked list, and display the data by reading from the linked list after all the line items have been added. Use the object names for Order and OrderDetail OrderDetail orderdetail = new OrderDetail ( “order details” ); Assume you have opened two files and populated each object with the correct values Write the signature line for this method. Write the line of code to display the OrderID property from the order object. Be sure to include a textual description. Write the line of code to display all of the properties from the order detail object. Be sure to include a textual description of each propertyarrow_forwardCreate a code for the bank transaction record using linked list.arrow_forward
- Implement all the functions from the Question 2 and make a login and sign up module, all thedata will be stored in the files and as well as in the linked list, Program will have two modules1. login2. sign upSign Up:In this module the program will ask the user to enter username, password, address, city, phonenumber, gender and will store the data in the linked list. If the username already exists in thelinked list it will ask the user to change the username, all the data will also be stored in the textfile.Login: In this module the user will enter its username and password, the program will check if the dataexists in the linked list, if yes then show “Welcome to home screen”, if not then ask the user toenter the username and password again.Work Flow:1. The program will start and all the data from the files will be loaded in the linked list.2. The login and sign up screen will pop up3. Apply proper checks, if the file exists or not (Hint: you can use try catch to handle theexceptions)…arrow_forwardYou can make this code connection functions between P2P machines: import threading import socket import pickle import time import struct import hashlib import os class FileManager(object): def __init__(self): self.files = {} self.download_path = "" def hash_data(self, data): hasher = hashlib.md5() hasher.update(data) return str(hasher.hexdigest()) def hashFile(self, filepath): hasher = hashlib.md5() try: with open(filepath, "rb") as afile: buf = afile.read() while len(buf) > 0: hasher.update(buf) buf = afile.read() return hasher.hexdigest() except: print("Couldn't find/hash file " + filepath) def refresh(self): for i in list(self.files): if self.files[i]["path"] is not None: if not os.path.exists(self.files[i]["path"]): print(…arrow_forwardWhen I run this code i get an error that says. Traceback (most recent call last):File "C:\Users\ept20\OneDrive\Desktop\student_file1.py", line 49, in <module>stu_info.add_students(name, number, email)AttributeError: 'Studentinfo' object has no attribute 'add_students' import pathlib class Studentinfo:def __init__(self):self.student_list = [] def save_students(self):"""Saving the information to the record file"""record_file = pathlib.Path("c://users//ept20//onedrive//Desktop//student_file.txt")with record_file.open(mode='a', encoding='utf-8') as file:for info in self.student_list:name, number, email = infofile.write(f'{name},{number},{email}\n') def add_students(self,name,number,email):"""Add a student to the student list"""student_info = (name, number, email)self.student_list.append(student_info) class Student:def __init__(self, name, number, email):self.name = nameself.number = numberself.email = emailprint(f'A new student object: {self.name} is created')def…arrow_forward
- Q4 Using the Linux Shell write a script that takes two files as arguments and determine if they are hard links of each other by comparing inode values. Test with two files with the name inode, a file against itself, two different files and a file against a symbolic link to itself.arrow_forwardIf wrong answer this time will downvote it Create a class with a static main that tests the ability to resolve and print a Path: • Create an instance of a FileSystem class. • Resolve an instance of a Path interface from a directory path and filename. • Print the constructed Path with System.out.println() method. 2. Create a class with a static main that tests the ability to resolve and print a Path: • Create an array of Path class. • Instantiate instances of Path with absolute and relative paths. • Print the constructed elements of the array of Path class with System.out.println() method. 3. Create a class to test serialisation class that implements serializable, it should implement the following: • A static void method that serialises an object. • A static void method that deserializes an object. • A static main method that tests the two by moving an object from one to the otherarrow_forwardThe linked list is Select one: a. A link that points to another link b. a pointer that points to node structure c. Array of nodes structure d. array of pointers each one point to node structurearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License