Assignment Details:
You have learned that some markets are competitive but that there are also a few markets that are serviced by just one firm. Examples include utility companies that provide electricity and natural gas to homeowners.
Please draw on your own experiences and what you have learned in Unit 4 to discuss the following points. Please use economic concepts; and use references in your main contribution.
Please identify and describe your local utility.
Please explain what products or services it provides.
Are there other companies that provide these products in your community?
Have prices increased in the last 2 years? Please explain.
Do you think prices would be higher or lower if there were 2 or more providers? Please explain.
Deliverable Length: 200 words (minimum)
Reading Assignment
Read the following chapters from the Microeconomics textbook:
· Chapter 7
· Barriers to Entry, Economies of Scale, p. 98
· Welfare and Monopoly, pp. 103-150
· Antitrust, pp. 110-116
· Price Discrimination, p. 104
· Average Cost Pricing, p. 105
Liem Le | COSC2436 #1
School of Engineering and Technology
COSC2436 – LAB 7
Title Tree Data Structure – Binary Search Tree
Time to
complete
Two weeks
COURSE OBJECTIVES
LEARNING OUTCOME
LAB OBJECTIVES
-Apply Object Oriented programming
-Complete the lab on time (Time
Management)
-Do the lab by following the project process:
analysis, design, write the code, test, debug,
implement
-UML of data type class
-Write comments
-Write the code of data type classes including
data members, no-argument constructor,
parameter constructors, mutator methods,
assessor methods, toString and other methods
-INHERITANCE: write the code of child classes
including, data members, constructors and
other methods inherited from parent class
-apply Polymorphism: using object of the
parent class to point to object of child classes
-control structure: if..else, switch, do..while
-create object, access members of data type
class
-format the output in columns and double
numbers with 2 decimal digits
-display message box
-create and access 4 operations of the tree
data structure
-Create a new project, add source file to the project,
compile and run the program without errors and qualified
to the requirement
-Declare variables of int, double, String;
-provide UML of data types
-Create data types with data members, constructors,
mutator methods
-Apply Inheritance relationship
-Apply polymorphism in the project
-provide the pseudo-code of program
-create and manage the menu to loop back to re-display
after each task: using do.. while
-Use switch statement to determine and define the action
for each task
-Format the output in columns and double numbers wiwth 2
decimal digits
-Display message box
-can figure out the base case, reduce problem, general
solution and recursion algorithm to write the recursion code
for som.
Procuring digital preservation CAN be quick and painless with our new dynamic...
Assignment DetailsYou have learned that some markets are compet.docx
1. Assignment Details:
You have learned that some markets are competitive but that
there are also a few markets that are serviced by just one firm.
Examples include utility companies that provide electricity and
natural gas to homeowners.
Please draw on your own experiences and what you have
learned in Unit 4 to discuss the following points. Please use
economic concepts; and use references in your main
contribution.
Please identify and describe your local utility.
Please explain what products or services it provides.
Are there other companies that provide these products in your
community?
Have prices increased in the last 2 years? Please explain.
Do you think prices would be higher or lower if there were 2 or
more providers? Please explain.
Deliverable Length: 200 words (minimum)
Reading Assignment
Read the following chapters from
the Microeconomics textbook:
· Chapter 7
· Barriers to Entry, Economies of Scale, p. 98
· Welfare and Monopoly, pp. 103-150
· Antitrust, pp. 110-116
· Price Discrimination, p. 104
· Average Cost Pricing, p. 105
Liem Le | COSC2436 #1
2. School of Engineering and Technology
COSC2436 – LAB 7
Title Tree Data Structure – Binary Search Tree
Time to
complete
Two weeks
COURSE OBJECTIVES
LEARNING OUTCOME
LAB OBJECTIVES
-Apply Object Oriented programming
-Complete the lab on time (Time
Management)
-Do the lab by following the project process:
analysis, design, write the code, test, debug,
implement
-UML of data type class
-Write comments
3. -Write the code of data type classes including
data members, no-argument constructor,
parameter constructors, mutator methods,
assessor methods, toString and other methods
-INHERITANCE: write the code of child classes
including, data members, constructors and
other methods inherited from parent class
-apply Polymorphism: using object of the
parent class to point to object of child classes
-control structure: if..else, switch, do..while
-create object, access members of data type
class
-format the output in columns and double
numbers with 2 decimal digits
-display message box
-create and access 4 operations of the tree
data structure
-Create a new project, add source file to the project,
4. compile and run the program without errors and qualified
to the requirement
-Declare variables of int, double, String;
-provide UML of data types
-Create data types with data members, constructors,
mutator methods
-Apply Inheritance relationship
-Apply polymorphism in the project
-provide the pseudo-code of program
-create and manage the menu to loop back to re-display
after each task: using do.. while
-Use switch statement to determine and define the action
for each task
-Format the output in columns and double numbers wiwth 2
decimal digits
-Display message box
-can figure out the base case, reduce problem, general
solution and recursion algorithm to write the recursion code
5. for some problems, such as,
* factorial (int n), sum(int n), sum (int m, int n), fibonacci(int
n), and some other cases in real life, etc.
-can create the tree and access operations of the tree:
insert, fetch, delete, update and showAll
Liem Le | COSC2436 #2
Skills
required to
do the Lab
To do this lab, students have to know:
-Review to create the pseudo-code or a flowchart of a lab
-Review the syntax to create a data type class with data
members, constructors, mutator
accessor methods, method toString
-Review how to define a child class including data member,
6. constructor, toString and other
methods inheriting from parent class:
-Review how to declare an object in main(), how to access the
methods of data type classes
from main()
-Review how to apply polymorphism
-Review control structure: if..else, switch, do..while loop
-How to set the decimal digits (2) of a double number
-How to display the message box
-How to recognize base case, reduce problem, general solution
an recursion algorithm to help
writing the recursion code
-Understand the code of class BinarySearchTree and know how
to access its operatons
LAB
INSTRUCTION
REQUIREMENT PART 1
Write an application that allows users to work with the
recursion algorithm to calculate
values of the following. The recursion algorithm of each one
7. will be defined in a static
function of a separated data type class
n! Factorial of an integer n where n provided from the keyboard
an a power n, where a and n are int numbers provided from the
keyboard
Sum (n) Sum(n) = 1 + 2 + 3 + .. + n where n is an int provided
from the keyboard
Sum (m,
n)
Sum(m, n) = m + (m+1), (m+2) + … + n where m and n are int
numbers
provided from the keyboard
Fn Fibonacci sequence Fn = Fn – 1 + Fn-2; F0 = 0 and Fn1 =
1
GCD
(n,m)
The greatest common divisor (GCD) of two integers m and n; m
> n
where m, n are provided from the keyboard
In the application will allow users to select the task to do. After
8. finishing one task, users can
select to work with another task until they want to exit
1. n! (Factorial of an integer n)
2. an (a power n)
3. Sum(n) = 1 + 2 + 3 + .. + n
4. Sum(m, n) = m + (m+1), (m+2) + … + n
5. Fibonacci sequence Fn
6. GCD (The greatest common divisor of m and n)
The m and n are integer number that are read from the keyboard
The output should be, for example:
Factorial of n = 5 is 120
2 to the power 3 is 8
Liem Le | COSC2436 #3
Sum from 1 to 10 is: 55
Sum from 5 to 7 is 18
The Fibonacci at 10 is 55
Greatest Common Divisor (GCD) of 120 and 90 is 30
HOW TO DO
9. PART 1
Step: Write the code
-start editor create the project, add
RecursionStaticMethods_yourLastName file and
write Recursion static methods
-Add the driver class DemoRecursion_yourLastName and
follow the pseudo-code and use
java to write the code of the program
*Step3: compile and run the program
*Step4: debug if there is any errors to complete the program
LAB7
PART2
REQUIREMENT PART 2:
Create an application that allows users can work on the
information of BankCustomer with
the following tasks:
1. Insert
2. Fetch
3. Uncapsulation
4. Update
5. Delete
10. 6. Show all
INSERT
-Allow users to enter the information of a BankCustomer from
the keyboard
-Create the object then insert to the data structure
FETCH
-Allow users to type a customer id then search in the data
structure to look for the
BankCustomer. If it is found, print out the information on the
screen otherwise display the
message: “The customer cannot be found”
ENCAPSULATION
-Allow users to type a customer id from the keyboard. Search in
the date structure. If the
customer is found, ask for new address from the keyboard and
change the address of the
customer
-Fetch the customer with the same provided id to a different
object. Then compare the their
address.
11. If both the addresses are the same then display the message
“Binary Search Tree structure is
not encapsulated”
otherwise display the message “Binary Search Tree structure is
encapsulated” =[
UPDATE
Display the message to ask users to enter the customer id. Using
the customer id to read the
node out from the data structure as a customer.
Liem Le | COSC2436 #4
Asking for the new phone number from the keyboard and
change the phone of the customer
Update the data structure with the new node with new phone
with the same customer id.
Display the message “Update successful” or Updte failed”
DELETE
12. Display the message to ask users to enter the customer id.
Remove the node with the
entered id
Display the message to see if delete successfully or not
SHOW ALL
Display all the BankCustomers are currently stored in the data
structure
HOW TO DO
PART 2
Step1: Write the pseudo-code
Step2: Write the code
-start editor create the project, add
BankCustomer_yourLastName that you had in lab 6
and add class BinarySearchTree (use the code on the page 394-
396 for your reference ON
THE PAGE 396 LINE 110 return true CHANGE TO return
false)
--Also, the current code on page 396 does not take care
deleting the rood, you should
add the code to delete the root in 3 cases: root has no child, has
one child and has two
13. children
-Add the driver class
Demo_TreeDataStructure_yourLastName and follow the pseudo-
code and use java to write the code of the program
*Step3: compile and run the program
*Step4: debug if there is any errors to complete the program
HOW TO
TURN IN
RecursionStaticMethods_yourLastName.java
Demo_Recursion_yourLastName.java
RecursionStaticMethods_yourLastName.class
Demo_Recursion_yourLastName.class
Pseudo-code of part 1
BankCustomer_yourLastName.java
BinarySearchTree.java
Demo_TreeDataStructure_yourLastName.java
BankCustomer_yourLastName