
in c lanaguage only please. i only need help with 12.2. and please make sure it includes the addition of 4 new pet records and the deletion of the cat record.
thank you again
COP-2270 Lab 12
Write C programs for the problems below. Make sure to include in the file the source code in text and the
Exercise
Lab12.1
Write a program called mypets in which uses a typedef structure called PET defined as follow. PET data contains three members; the type of pet, the name of the pet, and its age. You should use in the program dynamic memory allocation, that you learned this week to create an array of PET objects. The pet information is entered by the user, and stored in a PET array as shown below. Finally, the program should output the pet information from the PET array. Make sure the program frees all memory before exiting.
Type
Name
Age
Dog
Terry
Taby
Cat
5 10
Parrot
Rabbit
Douglas
Bunker
30
2
Lab12.2
Write a linked-list program using program 12.3 studied in class, in which the listNode structure is replaced with the members of the PET structure from program problem 12.1. Show in the output screenshot(s) the addition of the four pet records and the deletion of the cat record from the linked list.
Hint: Use for the get name function strcmp() to determine where to insert the new pet in the linked list.

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

- what do you mean by this "Make sure to replace the file path in File file = new File("4Growth.txt"); with the correct path to your text file. This code reads the data from the file, creates Jurisdiction objects, calculates the change, and prints the table with the same formatting as before. It also handles the FileNotFoundException if the file is not found." and is there 2 classes to the project? why did you include the togetherarrow_forwardWrite a python script that reads the file student.txt which contains the names of students. Print out "Loading the names of the students." Then print the various information found in the file. For testing write any 5 names in your file and attach your code, file, and output in the document.arrow_forwardIt is not apparent what the results of executing a software that contains an error would be. What steps should be taken next after developing the code for the frmProgram? Can the event method for the command button be demonstrated? The sentence "Unload Me" serves a function, but what exactly is that function? What exactly is the function of a file that may be run?arrow_forward
- in python, implant class for worker attributes name and phone .in other file import worker , get input for attribute, append , in def print open and save information in file .txtarrow_forwardPlease help me by suggesting the steps I should take For this assignment, you will need two sessions open (e.g., a pair of ssh sessions, or a pair of xterms), one for answering the questions, and one for experimenting with different commands to see if they represent the correct answer. When you are satisfied with one of your commands, copy and paste it from your “experimental” window into your “question and answer” window. In either window, create a directory ~/UnixCourse/commandsAsst. Use cd to make that new commandsAsst directory your current working directory (in both of your session windows). For the remainder of the assignment, you should not cd into a different directory. In one window, give the command ~cs252/bin/basicCommandsAsst to start the assignment. This will place some files into the fileAsst directory from the prior assignment. Some of these will be text files (recognizable as such because their names end with “.txt”) and some are data files (named ending in…arrow_forwardNeed help with writing the program creating two different class files (Instruction are attatched in the images). Please provide with ss of your code if possible.arrow_forward
- Question 7. Debugging Source Code: Which of the following strategies could a developer use to debug source code? Answer all those that apply. a. Talk to other developers. b. Follow Coding Conventions. c. Follow code comment conventions. d. Extract build files. e. Use test and m_Trace flags. f. Use accessor methods. g. Review terminating conditions of FOR loops.arrow_forwardCreate a datafile that contains the first name, last name, gender, age, height, smoking preference, eye color and phone number. Add a variety of records to the file. A sample file looks like:  Write a program that opens the file and reads the records one by one. The program will skip any records where the gender preference is not a match. Of those records that match the gender preference, check to see if the age and height are between the maximum and minum preferences. Then check to see if the smoking preference and eye color are also a match. If at least 3 of the remaining fields match, consider the record a partial match, and print it in the report. If all 4 of the remaining fields match, the record is a perfect match and print it in the report with an asterisk next to it. At the end of the program, close the file and report how many total records there were of the specified gender, how many were a partial match, and how many were a perfect match.arrow_forwardThere are multiple test files for this project. My program must handle not only the expected file but also files with missing records, missing data, bad data, no records, and no file. Please help me with my Python code. def read_data(filename): try: with open(filename, "r") as file: return file.read() except FileNotFoundError: print("Error: Please provide an input file ") return "" except Exception as ex: print("Error:",ex) return "" def extract_data(tags, strings): data = [] start_tag = f"<{tags}>" end_tag = f"</{tags}>" while start_tag in strings: try: start_index = strings.find(start_tag) + len(start_tag) end_index = strings.find(end_tag) if end_index == -1: break value = strings[start_index:end_index] if value: data.append(value) strings = strings[end_index + len(end_tag):] except Exception as…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





