
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
Please run the following program and answer the questions.
#include
int main(void)
{
int arr[6]
=
int *pointer
pointer
*pointer
=
{10, 20, 30, 40, 50, 60};
=
&arr[0];
pointer + 2;
= 5 ;
pointer++;
*pointer
-
(*pointer) 5 ;
pointer++;
*pointer
* (pointer+1)
-
5%;
return 0;
1. [10 pts] Please list the values of elements in array arr after line 8 (*pointer
why.
=
5; ) and explain
>
Comparable
Method
- methodName: String
-priority: int
+ Method()
+ Method(methodName: String, priority: int)
+ abstract specificWay(): void
+ Getters and setters for all fields
compareTo(otherMethod: Method): int
+ toString(): String
ReadMethod
- language: String
+ ReadMethod()
+ ReadMethod(methodName: String,
priority: int, language: String)
+ specificWay(): void
+ Getters and setters for language
+ toString(): String
Part 1.1. Implement the abstract class Method implements Comparable interface according to its UML
diagram. Add comments stating where data fields, constructors, toString(), and other methods are (if
any). Neither method should have an empty body unless abstract methods.
1. two constructors (default and the constructor with all fields)
2. getters and setters for all fields (methodName and priority).
3. toString() method: modify by yourself to match the example output.
4. Abstract method void specificWay().
5. Implement compara To(Method otherMethod) to compare…
Exercise 1 Function and Structure [30 pts]
Please debug the following program and answer the following questions. There is a cycle in a linked
list if some node in the list can be reached again by continuously following the next pointer.
#include
typedef struct node {
int value;
struct node *next;
} node;
int ll_has_cycle (node *first)
if (first
NULL) return 0;
node *head = first%;B
while (head->next != NULL) {
}
if (head
first) {
return 1; }
head =
head->next;B
return 0;
void test_11_has_cycle() {
int i;
node nodes [6] ;
for (i =
0; i < 6; i++) {
nodes [i] .next = NULL;
nodes [i].value
i;
nodes [0] .next
=
&nodes [1];
nodes [1] .next
=
&nodes [2];
nodes [2] .next
&nodes [3];
nodes [3] .next
nodes [4] .next
& nodes [4];
NULL;
nodes [5] .next
&nodes [0];
printf("1. Checking first list for cycles. \n Function 11_has_cycle says it
has %s cycle\n\n", 11_has_cycle (&nodes[0])?"a":"no");
printf("2. Checking length-zero list for cycles. \n Function 11_has_cycle
says it has %s cycle\n\n",…
Knowledge Booster
Similar questions
- Hello, please solve this trying to follow this criteria. (use Keil) Abstract describing the requirements and goals of the assignment. List file with no errors or warnings. Brief description of your implementation design and code. Debugging screen shots for different scenarios with your reference and comments. Conclusionarrow_forwardWrite the following in C# WinForms. Implement a function in the main menu that makes the poacher move to random direction. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize); Create the appropriate poacher class as wellarrow_forwardWrite the following in C# WinForms. Implement a function in the main menu that makes the poacher move to random direction. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize);arrow_forward
- Write the following in C# WinForms. Implement a function in the main menu that makes the poacher move to random directions. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize);arrow_forwardWrite the following in C# WinForms. Create a poacher class that has random x and y values when created, private set function for x and y values. Implement a function in the main menu that makes the poacher move into random direction. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize); Write the following in C# WinForms. Create a poacher class that has random x and y values when created, private set function for x and y values. Implement a function in the main menu that makes the poacher move into random direction. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize);arrow_forwardWrite the following in C# WinForms. Create a poacher class that has random x and y values when created, private set function for x and y values. Implement a function in the main menu that makes the poacher move into random direction. The movement should seem seamless. The poacher can be drew by the following in the main menu. e.Graphics.DrawImage(poacherImage, poacher.X, poacherY, tileSize, tileSize);arrow_forward
- Write the following in C# WinForms. Create a poacher class that has random x and y values when created, private set function for x and y values. Implement a function in the main menu that makes the poacher move into random direction. The movement should seem seamless. The picture of the poacher is drew by e.Graphics.DrawImage(poacherImage, poacher.X, poacher.Y, tileSize, tileSize);arrow_forwardCreate a poacher class that has random x and y values when created, private set function for x and y values, and implement a function in the main menu that makes the poacher move into random direction. The movement should seem seamless. Write it in C# WinFormsarrow_forwardHi, please solve this trying to follow this criteria. (use Keil) Abstract describing the requirements and goals of the assignment. List file with no errors or warnings. Brief description of your implementation design and code. Debugging screen shots for different scenarios with your reference and comments. Conclusionarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning