java Singly linked list 1. Create a class called Citizen with the following attributes/variables: a. String citizenID b. String citizenName c. String citizenSurname d. String citizenCellNumber e. int registrationDay f. int registrationMonth
Q: Try to find the root mean speed from the velocities of ten particles(in m/s) which are entered by th...
A: Use a loop to iterate for 10 times and keep on accepting the input number and add its square to the ...
Q: Write a program to print following data
A: All the programs are written in Python: Program 1: Print the requirement print(''' -----------...
Q: For a certain processor, a Read request takes 80 nano seconds on a cache miss and 10 nano seconds on...
A: The answer is
Q: Lets say we are creating a python game. A word is displayed gets displayed on the screen. The playe...
A: - We need to know what datatype we should use for the word game problem.
Q: Write a Program in Java to find the value of universal gas constant at STP.
A: Your Java program is here with an output. Algorithm: 1. Start 2. Read the value of Volume, Pressur...
Q: The following incomplete code snippet: names ["Alice","Bob","Charlie"] scores = [15,5,10] winrates [...
A: Please refer to the following steps for the complete solution to the problem above.
Q: Lab Manual 223CCS-3 Advanced Object Oriented Programming Laboratory 3 GUI (Graphical User Interface)...
A:
Q: Invoices, MS Excel spreadsheets, printed documents and handwritten notes are examples of what? R...
A: To find "Invoices, MS Excel spreadsheets, printed documents and handwritten notes are examples of --...
Q: In what ways does a binary tree resemble a linked list?
A: Introduction: A tree has branches—-each node refers to one or more descendant nodes. A binary tree i...
Q: For the "internet" below with six websites, (a) Construct the ranking matrix for the system. (b) Fin...
A: In questions with many parts, we must answer the first The above formula can be used to rank matr...
Q: What is the reason that DMA requires cycle stealing?
A: We need to discuss, why DMA requires cycle stealing?
Q: Consider this data: "0 - 1" "1 - 1" "1 - 1" "1 - 0" "0 - 0" "1 - 0" "1 - 1" "1 - 1" "1 - 0" "0 - 1" ...
A: We need to form 4 columns out of X: A,B,C,D in R language.
Q: The Google search engine has a capability that allows web sites to show Google adverts. The advertis...
A: Google ads are nothing more than adverts on web pages; if a user visits a website that has Google ad...
Q: Create a program that calculates the interest on a loan. Console Interest Calculator Enter loan amou...
A: Algorithm: Start Create NumberFormat objects for the locale US to represent currency $ where one ob...
Q: Concept of SD-WAN?
A: Describe Concept of SD-WAN.
Q: True or False? {n²,n*,2", log n, ..} Big O Big Omega Big Theta 102 + 3000n + 10 21 log n 500 log n +...
A: We are going to find out the value of Big O, Big Omega and Big Theta for the given functions.
Q: How many memory accesses must a page fault occur if the memory access time is 200 nanoseconds and th...
A: Memory access time = 200 nano sec page-fault service time = 8 msec Effective Access Time (EAT)EAT is...
Q: Which of these connection technologies are viable for general-purpose networking of more than two ho...
A: The answer is
Q: 1001 1101 1000 1110 0011 1010 1001 0010 1000 0001 1101
A: Solution :- Step 1 Suppose we take the first two codewords 0000000 and 0001101 and perform the XOR o...
Q: Hello, can you answer multiple questions? 1. Which of the following is NOT an attribute that is ...
A: Following are the solutions to the given problem statements.
Q: te an EBNF description for a Java class definition header statement te a BNF description of the Bool...
A: 1.A Java class definition header statement <class_head> ® {<modifier>} class <id>...
Q: Despite the fact that Java is referred to as an interpreted language, it is actually a compiled lang...
A: Java Java is a compiler as well as an interpreted language. It compiles directly to machine code tha...
Q: What is regression testing?
A: Introduction: In this instance, regression refers to a previously fixed software bug that has return...
Q: The process control block (PCB) is a critical part of process management. Discuss the relevance of t...
A: Role of PCB in management of processes and resources is mentioned below,
Q: ntrusion protection systems and create a matrix comparing them, include comparisons of features, cos...
A: 1- VPN is one of the strong and populour tool which is being used across the globe in order to make ...
Q: Write a C++ program to calculate a rectangle's area. The program consists of the following function:...
A: It ask user to enter length and width Then it return the area of rectangle along with length and wi...
Q: Define the concept of temporal locality.
A: Locality: Programs frequently employ data and instructions with similar or identical addresses to th...
Q: Following the development and testing of individual software modules, they must be combined and test...
A: Introduction: Software development refers to computer programming, which is the process of writing a...
Q: java: // Class to do MergeSort and QuickSort on int arrays and test them public class MergeQuickS...
A:
Q: After completing this course successfully, you have been tasked with configuring a local area networ...
A: LAN: A local area network (LAN) is a group of computers and peripheral devices that share a common c...
Q: How are centralized and parallel/distributed databases different?
A: Distributed database uses concept of parallelism that stores database files at multiple locations. C...
Q: cuss the social and ethical aspects of using and deploying information technology.
A: The social and ethical aspects of using and deploying information technology:- Issues of social an...
Q: Explain the three formats of MIPS instructions and show how they are different each other.
A: Explain the three formats of MIPS instructions and show how they are different each other.
Q: One of the difficulties with computer security is that it is sometimes an afterthought, inserted int...
A: Introduction: Potential security feature assaults must be evaluated. Procedures employed to deliver ...
Q: What are the different sorts of programmes that come with operating systems? Give three to four exam...
A: Following are the sorts of programmes that come with operating systems Batch Operating System Mobil...
Q: What are some things to think about while creating a mobile app?
A: Several factors to consider when creating an application are as follows:
Q: Write code that outputs variable numMonths as follows. End with a newline. Ex: If the input is: 3 ...
A: Write code that outputs variable numMonths as follows. End with a newline. Ex: If the input is: 3 th...
Q: Encode the following ARM assembly instruction to ARM machine language code. CMNLT r0,#0×FF Ox
A: ARM assembly to ARM machine language code
Q: What is a downgrade attack, and how can you fight back against it?
A: Introduction: Downgrade attack: It's a type of computer system or communication protocol cryptograph...
Q: Please do it with regular expression. Don't use loops please. Do fast, I have no time left Write a j...
A: Required:- Please do it with regular expression. Don't use loops, please. Do fast, I have no time l...
Q: The formal approach to determining the big-O complexity of an algorithm is to set up recurrence rela...
A: - We need to choose for the recurrence of linear search and other time complexity in employee id sea...
Q: Define a problem with input, output, and Operator Overloading. If no output explain the reason why a...
A: cpp code:- /* adds two complex numbers *///overload the binary operator + #include <iostream&g...
Q: Analyze the way CPU registers are implemented in terms of logic gates
A: Introduction: They are the logic gates of digital electronics. Logic gates are often employed when c...
Q: Consider baking a cake to be the same as running three loops on a computer in parallel. Find and exp...
A: Introduction: A loop is a programming structure in computer science that repeats a sequence of instr...
Q: Mention the key features of Go-Bank-N and Selective Repeat.
A: Introduction: Sliding window methods include Go-Back-N and Selective Repeat. The transmitter window ...
Q: Consider the following circuit: P AND NOT S AND OR R (a) Find the output from the boolean circuit if...
A: First we will find the final expression S, then we will answer each part. (P*Q)' * (Q+R)=S ...... eq...
Q: Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is bet...
A: The answer is
Q: Why will we study any business model, and how will our business solution provide the organisation wi...
A: Introduction: Every day, fresh data sources become available. This may be a good thing for some of u...
Q: What type of IPv6 address do you need to get on the Internet? a. Global unicast address b. Anycast ...
A: To get on the internet, you need an address. That address should be unique and be your's only. This ...
Q: Explain why each of the three design objectives for relational databases is beneficial.
A: Let's see the solution in the next steps
java Singly linked list
1. Create a class called Citizen with the following attributes/variables:
a. String citizenID
b. String citizenName
c. String citizenSurname
d. String citizenCellNumber
e. int registrationDay
f. int registrationMonth
g. int registrationYear
using the code template below
Step by step
Solved in 3 steps with 1 images
- Define a Student class, with 3 data fields: ID: string Name: string FavoriteThing: string Create an application that stores and outputs a list of the students' favorite things. Suppose each student only has one favorite thing.JAVAclass: Main.java, Quadratic.java, TestQuadratic.java Create a class called Quadratic for representing a one-variable quadratic expression of the form: ax2 + bx + c a,b and c here are the coefficients. The class should contain the following methods: * A constructor that accepts values for a, b, and c. * public double getA() * public double getB() * public double getC() * public double evaluate (int x) * will return the value of the expression at point x * public double discriminant() - that will return (b2 - 4ac) * public boolean isImaginaryRoots() - roots are imaginary if (b2 - 4ac) < 0 * public boolean isRealRoots() - roots are real if (b2 - 4ac) >= 0 // these methods can only be invoked if the roots are not imaginary * public float firstRoot() * public float secondRoot() * public boolean isPerfectSquare(); // If the first and second roots are equal * Try to override the toString methods * Write a sample main program that will work as shown below. Example output:…Computer Science You are required to develop a small chatting application where two or more friends can communicate each other through messages. Create a class Message which has Date d, and message (string). Provide getters/setters, constructors, toString. Create a class Friend having String name, String contact, email and ArrayList of Messages provide getters/setters, constructors, toString addMessage(Message m) method which will add new message to the list. Provide following options to the user using JFrame. Login which will help user login to the application. View Friends (Display List of All Friends) View Messages ( This should display all message of a Friend) Send message (This should ask for friend name and message match the friend name and write that message to the array list).
- java Singly linked list 1. Create a class called Citizen with the following attributes/variables:a. String citizenIDb. String citizenNamec. String citizenSurnamed. String citizenCellNumbere. int registrationDayf. int registrationMonthg. int registrationYear2. Create a class called Node with the following attributes/variables:a. Citizen citizen b. Node nextNode 3. Create a class called CitizenRegister with the following attributes/variables:a. Node headNodeb. int totalRegisteredCitizens4. Add and complete the following methods in CitizenRegister:a. head()i. Returns the first citizen object in the linked listb. tail()i. Returns the last citizen object in the linked listc. size()i. Returns the totalRegisteredCitizend. isEmpty()i. Returns the boolean of whether the linked list is empty or note. addCitizenAtHead(Node newNode)i. Adds a new node object containing the citizen object information before the headNodef. addCitizenAtTail(Node newNode)i. Adds a new node object containing the citizen…Data structure & Algrothium java program Create the three following classes: 1. class containing two strings attributes first name and last name.2. class containing the name object and an ArrayList of string to store the list gifts. This class would extend the attached NicePersonInterface.java3. class containing one ArrayList of Names to store the naughty names. Another ArrayList of NicePerson to store the nice names and gifts. Add atleast 4 names in each list and display all information.CODE IN JAVA Please look at the attached image for the information about the format the code should be in It should have 2 java files one acting as server and other the client Design and implement an application that reads a sequence of up to 25 pairs of names and postal (zip) codes for individuals. Store the data in an object of a class called “NameAndZip”, designed to store a first name (String), last name (String), and a postal code (int). Create a driver class called “NameAndZipList”. Assume that each line of input will contain two strings followed by an integer value. You will then create an object for each line read in and store that object in an array of NameAndZip objects. After the Names and Codes have been entered, print the list in an appropriate format to the screen using the toString method in the NameAndZip class. To test the program enter 3 names and codes.
- JAVA 2 LANGUAGE 8.2 (The Stock class) Following the example of the Circle class in Section 8.2, design a class named Stock that contains: ■ A string data field named symbol for the stock’s symbol. ■ A string data field named name for the stock’s name. ■ A double data field named previousClosingPrice that stores the stock price for the previous day. ■ A double data field named currentPrice that stores the stock price for the current time. ■ A constructor that creates a stock with the specified symbol, name, previousClosingPrice, and currentPrice. ■ A method named getChangePercent() that returns the percentage changed from previousClosingPrice to currentPrice. The formula to be used is (currentPrice - previousClosingPrice) / previousClosingPrice. Draw the UML diagram for the class and then implement the class (write the code for the class). Write a test program (application) in which you create a Stock object stock1 with the stock symbol ORCL, the name Oracle Corporation, the…Object Oriented Programming: 213COMP, 214COMP (Feb-2022) Assignment- I [10 marks] Academic honesty: O Only pdf file accepted & student ID, will be your upload file. O Student who submit copied work will obtain a mark of zero. O Late work or attach file by email message not allowed. Q1: Write the signature for a method that has one parameter of type String, and does not return a value. Q2: Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q3: Write the constructor's headers of the followings? new Student (202101156, “Ahmed"); new Address(51, "jazan university","CS&IT" ); new Grade(true, 505235600, 4.5); Q4: a) Write a class Student that define the following information: name, stid , age. b) Explain a mutators (setters) and accessors(getters) methods for each attributes(fields). c) Add three constructors: • with empty constructor. one parameter constructor (name of student) two parameters constructor (name and stid) d) Create two…java programming Create a class called Citizen with the following attributes/variables:a. String citizenIDb. String citizenNamec. String citizenSurnamed. String citizenCellNumbere. int registrationDayf. int registrationMonthg. int registrationYear2. Create a class called Node with the following attributes/variables:a. Citizen citizen b. Node nextNode 3. Create a class called CitizenRegister with the following attributes/variables:a. Node headNodeb. int totalRegisteredCitizens4. Add and complete the following methods in CitizenRegister:a. head()i. Returns the first citizen object in the linked listb. tail()i. Returns the last citizen object in the linked listc. size()i. Returns the totalRegisteredCitizend. isEmpty()i. Returns the boolean of whether the linked list is empty or note. addCitizenAtHead(Node newNode)i. Adds a new node object containing the citizen object information before the headNodef. addCitizenAtTail(Node newNode)i. Adds a new node object containing the citizen object…
- Data structure & Algrothium java program Santa Claus allegedly keeps list of those are naughty and those who are nice. On the naughty list are the names of those who will get coal in their stockings. On the nice list are those who will receive gifts. Each object on this list contains a name and a list of that person's gifts. Create the following classes: 1. Name.java object class containing two strings attributes first name and last name (and appropriate constructors, setters/getters)2. NicePerson.java object class containing the name object and an ArrayList of string to store the list gifts ( and appropriate constructors, setters/getters). This class would extend the attached NicePersonInterface.java3. Santa.java object class containing one ArrayList of Names to store the naughty names. Another ArrayList of NicePerson to store the nice names and gifts. Add atleast 4 names in each list and display all information.C++ Create a class named Student that has three member variables:name – A string that stores the name of the studentnumClasses – An integer that tracks how many courses the student is currently enrolledinclassList – A dynamic array of strings used to store the names of the classes that thestudent is enrolled inWrite appropriate constructor(s), mutator, and accessor methods for the class along with thefollowing: A method that inputs all values from the user, including the list of class names. Thismethod will have to support input for an arbitrary number of classes. A method that outputs the name and list of all courses. A method that resets the number of classes to 0 and the classList to an empty list. An overloaded assignment operator that correctly makes a new copy of the list ofcourses. A destructor that releases all memory that has been allocated.Write a main method that tests all of your functions.Task 2: Delivery Vehicle We want to develop a delivery vehicle that can carry a limited number of equally weighted boxes. To do this we can build off of our previous task by extending the BasicVehicle class. Instructions 1. Create a new class called DeliveryVehicle that is a subclass of BasicVehicle: • a private attribute cargoList of type String[] • a private attribute numItems of type int 2. Create a constructor that takes two parameters: a String for registration, and an int for maxCapacity: • pass on the registration parameter to the super constructor along with 0.0 for altitude, longitude and latitude. • use the maxCapacity parameter to create a new array for cargoList 3. Create a boolean method called isFull that returns if the cargoList is full. 4. Create a boolean method called isEmpty that returns if there are no boxes loaded. 5. Create a method called loadCargo that takes a String parameter description and adds the cargo description to the cargo list (if it is not already…