SlideShare a Scribd company logo
1 of 14
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 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,
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
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
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
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
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.
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
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
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
BinarySearchTree.java
Demo_TreeDataStructure_yourLastName
Pseudo-code of part 2
IF YOU GET ANY PROBLEM TO SUBMIT FILE .class, YOU
CAN SUBMIT ALL PROJECT INTO ONE
FILE .zip or .rar TO SEND
Liem Le | COSC2436 #5

More Related Content

Similar to Assignment DetailsYou have learned that some markets are compet.docx

Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 solIIUM
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine LearningStudent
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Digital Electronics & Fundamental of Microprocessor-I
Digital Electronics & Fundamental of Microprocessor-IDigital Electronics & Fundamental of Microprocessor-I
Digital Electronics & Fundamental of Microprocessor-Ipravinwj
 
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEAR
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEARASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEAR
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEARDon Dooley
 
Chapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxChapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxtiffanyd4
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxAASTHA76
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxAnasYunusa
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docxemelyvalg9
 

Similar to Assignment DetailsYou have learned that some markets are compet.docx (15)

Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
Visual basic
Visual basicVisual basic
Visual basic
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Digital Electronics & Fundamental of Microprocessor-I
Digital Electronics & Fundamental of Microprocessor-IDigital Electronics & Fundamental of Microprocessor-I
Digital Electronics & Fundamental of Microprocessor-I
 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEAR
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEARASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEAR
ASSIGNMENT BOOKLET 2018 DIPLOMA IN IT 3 YEARS 1ST YEAR
 
Chapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxChapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docx
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Vb introduction.
Vb introduction.Vb introduction.
Vb introduction.
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab 6.docx
 
Designing Modules in Python
Designing Modules in PythonDesigning Modules in Python
Designing Modules in Python
 

More from faithxdunce63732

Assignment DetailsScenario You are member of a prisoner revie.docx
Assignment DetailsScenario You are member of a prisoner revie.docxAssignment DetailsScenario You are member of a prisoner revie.docx
Assignment DetailsScenario You are member of a prisoner revie.docxfaithxdunce63732
 
Assignment DetailsScenario You are an investigator for Child .docx
Assignment DetailsScenario You are an investigator for Child .docxAssignment DetailsScenario You are an investigator for Child .docx
Assignment DetailsScenario You are an investigator for Child .docxfaithxdunce63732
 
Assignment DetailsScenario You are a new patrol officer in a .docx
Assignment DetailsScenario You are a new patrol officer in a .docxAssignment DetailsScenario You are a new patrol officer in a .docx
Assignment DetailsScenario You are a new patrol officer in a .docxfaithxdunce63732
 
Assignment DetailsScenario Generally, we have considered sexual.docx
Assignment DetailsScenario Generally, we have considered sexual.docxAssignment DetailsScenario Generally, we have considered sexual.docx
Assignment DetailsScenario Generally, we have considered sexual.docxfaithxdunce63732
 
Assignment DetailsPower’s on, Power’s Off!How convenient is.docx
Assignment DetailsPower’s on, Power’s Off!How convenient is.docxAssignment DetailsPower’s on, Power’s Off!How convenient is.docx
Assignment DetailsPower’s on, Power’s Off!How convenient is.docxfaithxdunce63732
 
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docx
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docxAssignment DetailsIn 1908, playwright Israel Zangwill referred to .docx
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docxfaithxdunce63732
 
Assignment DetailsPart IRespond to the following.docx
Assignment DetailsPart IRespond to the following.docxAssignment DetailsPart IRespond to the following.docx
Assignment DetailsPart IRespond to the following.docxfaithxdunce63732
 
Assignment DetailsPlease discuss the following in your main post.docx
Assignment DetailsPlease discuss the following in your main post.docxAssignment DetailsPlease discuss the following in your main post.docx
Assignment DetailsPlease discuss the following in your main post.docxfaithxdunce63732
 
Assignment DetailsPennsylvania was the leader in sentencing and .docx
Assignment DetailsPennsylvania was the leader in sentencing and .docxAssignment DetailsPennsylvania was the leader in sentencing and .docx
Assignment DetailsPennsylvania was the leader in sentencing and .docxfaithxdunce63732
 
Assignment DetailsPart IRespond to the followingReview .docx
Assignment DetailsPart IRespond to the followingReview .docxAssignment DetailsPart IRespond to the followingReview .docx
Assignment DetailsPart IRespond to the followingReview .docxfaithxdunce63732
 
Assignment DetailsPart IRespond to the following questio.docx
Assignment DetailsPart IRespond to the following questio.docxAssignment DetailsPart IRespond to the following questio.docx
Assignment DetailsPart IRespond to the following questio.docxfaithxdunce63732
 
Assignment DetailsPart IRespond to the following questions.docx
Assignment DetailsPart IRespond to the following questions.docxAssignment DetailsPart IRespond to the following questions.docx
Assignment DetailsPart IRespond to the following questions.docxfaithxdunce63732
 
Assignment DetailsOne thing that unites all humans—despite cultu.docx
Assignment DetailsOne thing that unites all humans—despite cultu.docxAssignment DetailsOne thing that unites all humans—despite cultu.docx
Assignment DetailsOne thing that unites all humans—despite cultu.docxfaithxdunce63732
 
Assignment DetailsMN551Develop cooperative relationships with.docx
Assignment DetailsMN551Develop cooperative relationships with.docxAssignment DetailsMN551Develop cooperative relationships with.docx
Assignment DetailsMN551Develop cooperative relationships with.docxfaithxdunce63732
 
Assignment DetailsInfluence ProcessesYou have been encourag.docx
Assignment DetailsInfluence ProcessesYou have been encourag.docxAssignment DetailsInfluence ProcessesYou have been encourag.docx
Assignment DetailsInfluence ProcessesYou have been encourag.docxfaithxdunce63732
 
Assignment DetailsIn this assignment, you will identify and .docx
Assignment DetailsIn this assignment, you will identify and .docxAssignment DetailsIn this assignment, you will identify and .docx
Assignment DetailsIn this assignment, you will identify and .docxfaithxdunce63732
 
Assignment DetailsFinancial statements are the primary means of .docx
Assignment DetailsFinancial statements are the primary means of .docxAssignment DetailsFinancial statements are the primary means of .docx
Assignment DetailsFinancial statements are the primary means of .docxfaithxdunce63732
 
Assignment DetailsIn this assignment, you will identify a pr.docx
Assignment DetailsIn this assignment, you will identify a pr.docxAssignment DetailsIn this assignment, you will identify a pr.docx
Assignment DetailsIn this assignment, you will identify a pr.docxfaithxdunce63732
 
Assignment DetailsHealth information technology (health IT) .docx
Assignment DetailsHealth information technology (health IT) .docxAssignment DetailsHealth information technology (health IT) .docx
Assignment DetailsHealth information technology (health IT) .docxfaithxdunce63732
 
Assignment DetailsDiscuss the followingWhat were some of .docx
Assignment DetailsDiscuss the followingWhat were some of .docxAssignment DetailsDiscuss the followingWhat were some of .docx
Assignment DetailsDiscuss the followingWhat were some of .docxfaithxdunce63732
 

More from faithxdunce63732 (20)

Assignment DetailsScenario You are member of a prisoner revie.docx
Assignment DetailsScenario You are member of a prisoner revie.docxAssignment DetailsScenario You are member of a prisoner revie.docx
Assignment DetailsScenario You are member of a prisoner revie.docx
 
Assignment DetailsScenario You are an investigator for Child .docx
Assignment DetailsScenario You are an investigator for Child .docxAssignment DetailsScenario You are an investigator for Child .docx
Assignment DetailsScenario You are an investigator for Child .docx
 
Assignment DetailsScenario You are a new patrol officer in a .docx
Assignment DetailsScenario You are a new patrol officer in a .docxAssignment DetailsScenario You are a new patrol officer in a .docx
Assignment DetailsScenario You are a new patrol officer in a .docx
 
Assignment DetailsScenario Generally, we have considered sexual.docx
Assignment DetailsScenario Generally, we have considered sexual.docxAssignment DetailsScenario Generally, we have considered sexual.docx
Assignment DetailsScenario Generally, we have considered sexual.docx
 
Assignment DetailsPower’s on, Power’s Off!How convenient is.docx
Assignment DetailsPower’s on, Power’s Off!How convenient is.docxAssignment DetailsPower’s on, Power’s Off!How convenient is.docx
Assignment DetailsPower’s on, Power’s Off!How convenient is.docx
 
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docx
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docxAssignment DetailsIn 1908, playwright Israel Zangwill referred to .docx
Assignment DetailsIn 1908, playwright Israel Zangwill referred to .docx
 
Assignment DetailsPart IRespond to the following.docx
Assignment DetailsPart IRespond to the following.docxAssignment DetailsPart IRespond to the following.docx
Assignment DetailsPart IRespond to the following.docx
 
Assignment DetailsPlease discuss the following in your main post.docx
Assignment DetailsPlease discuss the following in your main post.docxAssignment DetailsPlease discuss the following in your main post.docx
Assignment DetailsPlease discuss the following in your main post.docx
 
Assignment DetailsPennsylvania was the leader in sentencing and .docx
Assignment DetailsPennsylvania was the leader in sentencing and .docxAssignment DetailsPennsylvania was the leader in sentencing and .docx
Assignment DetailsPennsylvania was the leader in sentencing and .docx
 
Assignment DetailsPart IRespond to the followingReview .docx
Assignment DetailsPart IRespond to the followingReview .docxAssignment DetailsPart IRespond to the followingReview .docx
Assignment DetailsPart IRespond to the followingReview .docx
 
Assignment DetailsPart IRespond to the following questio.docx
Assignment DetailsPart IRespond to the following questio.docxAssignment DetailsPart IRespond to the following questio.docx
Assignment DetailsPart IRespond to the following questio.docx
 
Assignment DetailsPart IRespond to the following questions.docx
Assignment DetailsPart IRespond to the following questions.docxAssignment DetailsPart IRespond to the following questions.docx
Assignment DetailsPart IRespond to the following questions.docx
 
Assignment DetailsOne thing that unites all humans—despite cultu.docx
Assignment DetailsOne thing that unites all humans—despite cultu.docxAssignment DetailsOne thing that unites all humans—despite cultu.docx
Assignment DetailsOne thing that unites all humans—despite cultu.docx
 
Assignment DetailsMN551Develop cooperative relationships with.docx
Assignment DetailsMN551Develop cooperative relationships with.docxAssignment DetailsMN551Develop cooperative relationships with.docx
Assignment DetailsMN551Develop cooperative relationships with.docx
 
Assignment DetailsInfluence ProcessesYou have been encourag.docx
Assignment DetailsInfluence ProcessesYou have been encourag.docxAssignment DetailsInfluence ProcessesYou have been encourag.docx
Assignment DetailsInfluence ProcessesYou have been encourag.docx
 
Assignment DetailsIn this assignment, you will identify and .docx
Assignment DetailsIn this assignment, you will identify and .docxAssignment DetailsIn this assignment, you will identify and .docx
Assignment DetailsIn this assignment, you will identify and .docx
 
Assignment DetailsFinancial statements are the primary means of .docx
Assignment DetailsFinancial statements are the primary means of .docxAssignment DetailsFinancial statements are the primary means of .docx
Assignment DetailsFinancial statements are the primary means of .docx
 
Assignment DetailsIn this assignment, you will identify a pr.docx
Assignment DetailsIn this assignment, you will identify a pr.docxAssignment DetailsIn this assignment, you will identify a pr.docx
Assignment DetailsIn this assignment, you will identify a pr.docx
 
Assignment DetailsHealth information technology (health IT) .docx
Assignment DetailsHealth information technology (health IT) .docxAssignment DetailsHealth information technology (health IT) .docx
Assignment DetailsHealth information technology (health IT) .docx
 
Assignment DetailsDiscuss the followingWhat were some of .docx
Assignment DetailsDiscuss the followingWhat were some of .docxAssignment DetailsDiscuss the followingWhat were some of .docx
Assignment DetailsDiscuss the followingWhat were some of .docx
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
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
  • 14. BinarySearchTree.java Demo_TreeDataStructure_yourLastName Pseudo-code of part 2 IF YOU GET ANY PROBLEM TO SUBMIT FILE .class, YOU CAN SUBMIT ALL PROJECT INTO ONE FILE .zip or .rar TO SEND Liem Le | COSC2436 #5