Questions
8.14 LAB: Warm up: Contacts (C Programming Only) You will be building a linked list. Make...

8.14 LAB: Warm up: Contacts (C Programming Only)

You will be building a linked list. Make sure to keep track of both the head and tail nodes.

(1) Create three files to submit.

  • ContactNode.h - Struct definition, including the data members and related function declarations
  • ContactNode.c - Related function definitions
  • main.c - main() function

(2) Build the ContactNode struct per the following specifications:

  • Data members
  • char contactName[50]
  • char contactPhoneNum[50]
  • struct ContactNode* nextNodePtr
  • Related functions
  • CreateContactNode() (2 pt)
  • InsertContactAfter() (2 pts)
    • Insert a new node after node
  • GetNextContact() (1 pt)
    • Return location pointed by nextNodePtr
  • PrintContactNode()


Ex. of PrintContactNode() output:

Name: Roxanne Hughes
Phone number: 443-555-2864


(3) In main(), prompt the user for three contacts and output the user's input. Create three ContactNodes and use the nodes to build a linked list. (2 pts)

Ex:

Person 1
Enter name:
Roxanne Hughes
Enter phone number:
443-555-2864
You entered: Roxanne Hughes, 443-555-2864

Person 2
Enter name:
Juan Alberto Jr.
Enter phone number:
410-555-9385
You entered: Juan Alberto Jr., 410-555-9385

Person 3
Enter name:
Rachel Phillips
Enter phone number:
310-555-6610
You entered: Rachel Phillips, 310-555-6610


(4) Output the linked list. (2 pts)

Ex:

CONTACT LIST
Name: Roxanne Hughes
Phone number: 443-555-2864

Name: Juan Alberto Jr.
Phone number: 410-555-9385

Name: Rachel Phillips
Phone number: 310-555-6610

In: Computer Science

Ann O'Rexia suffers from anorexia nervosa. In addition to a low body weight, decreased muscle mass,...

Ann O'Rexia suffers from anorexia nervosa. In addition to a low body weight, decreased muscle mass, glycogen, and fat stores, she has iron deficiency anemia. She constantly feels weak and tired. When she walks, she feels pain in her calf muscles. On this visit to her nutritionist, they discuss the vitamin content of her diet and its role in energy metabolism.  She is deficient in thiamine, riboflavin, biotin and niacin (the vitamin precursor of NAD+). In the context of the metabolic pathways discussed in Chapter 14, specifically how would these affect carbohydrate metabolism.

In: Biology

Chapter 20, programming challenge 2: Linked List Sorting and Reversing Modify the LinkedList1 class presented in...

Chapter 20, programming challenge 2: Linked List Sorting and Reversing

Modify the LinkedList1 class presented in this chapter by adding sort() and reverse() methods. The reverse method reverses the order of the elements in the list, and the sort method rearranges the elements in the list so they are sorted in alphabetical order. Do not use recursion to implement either of these operations. Extend the graphical interface in the LinkedListDemo class to support sort and reverse commands, and use it to test the new methods.

This must be done in java (netbeans)

In: Computer Science

What is the main difference between arrays and ArrayLists? Arrays can be resized, ArrayLists cannot. ArrayLists...

  1. What is the main difference between arrays and ArrayLists?
    1. Arrays can be resized, ArrayLists cannot.
    2. ArrayLists can be resized, Arrays cannot.
    3. Arrays can hold more information than ArrayLists
    4. ArrayLists can hold more information than Arrays

  1. What method is used to add a new element to the end an ArrayList?
    1. .add
    2. .new
    3. .insert
    4. .put

  1. What is the proper syntax for accessing the third element of an ArrayList called Books?
    1. Books.elementAt(3);
    2. Books.elementAt(2);
    3. Books[3];
    4. Books[2];

  1. What is overloading?
    1. Having a method in a child class which replaces a method of the same name in the parent class
    2. Having two or more method with the same name but different parameters
    3. Writing more methods than a class can support
    4. Writing more child classes than a parent class can support

  1. What is overriding?
    1. Having a method in a child class which replaces a method of the same name in the parent class
    2. Having two or more method with the same name but different parameters
    3. Writing more methods than a class can support
    4. Writing more child classes than a parent class can support

  1. When does a constructor run?
    1. When the program ends
    2. When the program starts
    3. When an object is released from memory
    4. When an object is created.

  1. Which of the following is the proper syntax for having a class named Child inherit from a class named Parent?
    1. public class Child extends Parent
    2. public class Child implements Parent
    3. public class Child : Parent
    4. public class Child -> Parent

  1. What is a virtual method?
    1. A method that can be overridden but does not have to be overridden
    2. A method with no definition that must be overridden
    3. A method that cannot be overridden
    4. Virtual methods are not supported by C#

  1. What is an abstract method?
    1. A method that can be overridden but does not have to be overridden
    2. A method with no definition that must be overridden
    3. A method that cannot be overridden
    4. Abstract methods are not supported by C#

  1. True/False. An abstract class cannot be instantiated.
    1. True
    2. False

  1. Which of the following is valid:
    1. ParentClass myObject = new ChildClass();
    2. ChildClass myObject = new ParentClass();
    3. new ParentClass myObject = ChildClass();
    4. new ChildClass myObject = ParentClass();

  1. MessageBox._______ causes a popup to display on the screen
    1. popup
    2. display
    3. show
    4. dialog

  1. The _________ property of the textbox, label, and many other controls determines what is currently written in the control.
    1. label
    2. writing
    3. text
    4. name
  1. Complete the following code:

foreach(int i ______ intArr)

    1. in
    2. on
    3. under
    4. over
  1. A private variable is
  1. Only in a method
  2. Only accessible from a method methods
  3. Part of a class, not an instance.
  4. Part of an instance, Not a class.
  1. The static Keyword
  1. Allows access to a method without an instantiated object
  2. Allows instance variables to be accessed from within a static method
  3. Only has one copy of itself during runtime
  4. Both 1 & 3
  5. All of the above.
  1. Properties are different than fields because:
  1. Fields are static
  2. Properties are static
  3. Properties can perform actions such as method calls
  4. Fields can perform actions such as method calls.
  1. An object is a(n) ____________ of a class.
    1. figment
    2. institution
    3. instantiation
    4. child
  1. Class fields are created with the ____________ modifier by default.
    1. Public
    2. Private
    3. Internal
    4. Caustic
  2. The thisreference is (Circle all that apply)
    1. Confusing
    2. Straight-Forward
    3. Implied in certain circumstances
    4. Better than a sharp stick in the eye.

In: Computer Science

Question 12 PYTHON: Write a function named first_last that takes a single parameter, string_list (a list...

Question 12 PYTHON:

Write a function named first_last that takes a single parameter, string_list (a list of strings). The
function first_last should return a list of the strings in string_list that are not empty and that begin
and end with the same letter.

For example, the following would be correct input and output for the function first_last.

response = ['to', 'that', 'I', 'say', '', 'hurrah']
print(first_last(response))
['that', 'I', 'hurrah']

Question 13 (20 points)

Write a function named number_luck. The function number_luck takes two parameters:

1. lucky, a list of lucky numbers between 2 and 12, inclusive
2. unlucky, a list of unlucky numbers between 2 and 12, inclusive

Every number is either lucky, unlucky or boring (neither lucky nor unlucky).

The function number_luck should

1. ask the user for a number in the range 2 to 12 (you may assume that the user provides valid
input)
2. print a message echoing the user’s number and stating whether it is lucky, unlucky or boring
3. return an integer that is the user’s number

For example, the following would be correct input and output.

>>> a_num = number_luck([7, 11], [2, 3, 12])
Give me a number from 2 to 12: 7
7 is lucky. You win!
>>> print(a_num)
7

In: Computer Science

Which areas of the network would a college IT staff most likely NOT have to redesign...

Which areas of the network would a college IT staff most likely NOT have to redesign as a direct result of many students bringing their own tablets to school to access school resources? And explain the function of each design (choose 4) (1pt each correct ans. + 3 pts. for each explanation)?

Extranet:

Intranet:

Wired LAN:

Wireless LAN:

Wireless WAN:

In: Computer Science

South Africa is a unique country with differing cultures: following on this; 1. critically analyze the...

South Africa is a unique country with differing cultures: following on this;

1. critically analyze the four-level levels of conceptualization of Leadership; and then

2. Decide which level of conceptualization of Leadership suits this community best and prepare a systematic exposition that supports your decision.

In: Operations Management

Various types and uses of trade policies ( tariffs and subsidies) Most common types of FDI...

  • Various types and uses of trade policies ( tariffs and subsidies)
  • Most common types of FDI and how FDI use varies based on developed versus developing economies
  • Most common forms of international entry (i.e. exporting, licensing, franchising, strategic alliances, acquisitions, wholly owned subsidiaries)
  • Factors influencing a firm’s decision regarding scale and timing of international entry
  • Different forms of regional economic integration (economic unions, free trade areas, political unions, etc.)
  • Commonly recognized regional economic integrations (i.e. European Union and NAFTA)
  • The different strategies pursued by multinational firms and factors that influence the decision to enact a particular strategy (business level strategies such as differentiation or cost leadership, as well as international strategies such as international, localization, global standardization, and transnational)
  • The different activities (primary and support) enacted by the firm
  • The nature and considerations of centralization and controls among varying forms of international structures (organizational architecture issues)

In: Economics

Find a value of the standard normal random variable z ​, call it z 0z0​, such...

Find a value of the standard normal random variable z ​, call it

z 0z0​,

such that the following probabilities are satisfied.

a.

​ P(zless than or equals≤z 0z0​)equals=0.09730.0973

e.

​ P(minus−z 0z0less than or equals≤zless than or equals≤​0)equals=0.25792579

b.

​ P(minus−z 0z0less than or equals≤zless than or equals≤z 0z0​)equals=0.9595

f.

​ P(minus−33less than<zless than<z 0z0​)equals=0.95759575

c.

​P(minus−z 0z0less than or equals≤zless than or equals≤z 0z0​)equals=0.9090

g.

​P(zgreater than>z 0z0​)equals=0.5

d.

​P(minus−z 0z0less than or equals≤zless than or equals≤z 0z0​)equals=0.82148214

h.

​P(zless than or equals≤z 0z0​)equals=0.00310.0031

a.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)b.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)c.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)d.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)e.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)f.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)g.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)h.

z 0z0equals=nothing

​(Round to two decimal places as​ needed.)

In: Math

Operations Management 1- What is the Operations sector and what administrative jobs can be found there?...

Operations Management
1- What is the Operations sector and what administrative jobs can be found there?
2- What are the other sectors of a company and what support do they give to Operations?
3- What does the modern consumer ask for?
4- What is a company's strategy and why is it important to take it into consideration in the
Operations management?
5- What is a company's competitiveness and how does it affect the economy of a nation?
6- What do they mean and what are the core competencies?
7- What does productivity measure and how is it interpreted?

In: Operations Management

Compare and contrast the three types of coronaviruses: "SARS-Cov, MERS-Cov and Covid-2019" in regards to their...

Compare and contrast the three types of coronaviruses: "SARS-Cov, MERS-Cov and Covid-2019" in regards to their replication cycle, transmission, R0

In: Biology

The horizontal and vertical components of the initial velocity of a football are 20m/s and 30...

The horizontal and vertical components of the initial velocity of a football are 20m/s and 30 m/s respectively. Assume that after rising some height, the football returns back to the ground level.

1) what is the speed of the football at 3s after launch?

2) to what maximum height does the football rise?

3)What horizontal distance does the football travel during its flight?

Please show full explaination and steps for answer.

In: Physics

Unit 003 Review of Material that has been covered There are two parts to each question...

Unit 003 Review of Material that has been covered

There are two parts to each question . Part 1 just give the null hypothesis, alternative hypothesis and test statistic formula. for part 1 don't work it out just write the formula.

Part 2-This is where you work all five steps. Show all work.

#5

A randomly selected list of holiday food items was generated. Thirty King Kong stores were surveyed as to what the cost of the list of items would cost. The mean and standard deviation is recorded in the table below. Fifty Saves Alot stores were surveyed in a similar manner and the mean and the standard deviation was recorded below. Test whether the King Kong mean amount spent is less than the Saves Alot amount spent. a = 0.01.

store name         Sample size        Mean amount spent        s   
King Kong 30 $75 10   
Saves Alot 50 $89 20

In: Math

use the thin lens equation to explain why for a given screen-object distance there are two...

use the thin lens equation to explain why for a given screen-object distance there are two positions where the image is in focus

In: Physics

draw and explain the pain pathway of trigomenialthalamic tract

draw and explain the pain pathway of trigomenialthalamic tract

In: Biology