Any big political event sports event arises complex data structure
Task 1: Design a date formatting function (Vickers, 200)
Write a function that takes four parameters: day, month, year (all integers), and UKFormat (a Boolean). The function should combine the three date parameters into a single string which it should then return.
return '' + day + '/' + month + '/' + year ;
}
1. discuss how behavior can be encapsulated using procedures and functions
Ans:
Encapsulation is defined by all data members will put in the single
unit means in same class called encapsulation. When function
is user-defined then it allow to encapsulate user code into
the modules which is easy to use and which can be used again
and again at several places without need to copy that code. It can hide
all internal details of any objects or we can say that
prevents leaking of information in one object to another.
(Academia, 2015)
Task 2: Credit Card System
A company wants to design a system for managing credit cards. The
system needs to track information about the person who has the credit
card, details about the credit card, and the transactions that have been
made against the credit card. The system should also have a way of
verifying that the credit card number is valid, what the current balance
on the credit card is, and should be able to accept or reject
transactions based on the current state of the card.
(3). What operations or methods need to be performed against those entities?
Ans:
|
---|
You will also need to:
(1). discuss the nature of objects as higher level abstractions
•It must be permit the state of any object to be accessed and recreated through behaviors.
(4). discuss how object-oriented computational thinking differs from procedural computational thinking
Ans:
bus{number , roadNumber , time}
You will also need to:
Ans: We have data from various systemsystems, andemban the road nety. (Wikipedia, 2015)
It is based on the collection of localization data, speed, direction of travel and time information fromin vehicles that are being driven. These data are the essential source fand for most(ITS). This means tith an active the road network. Based on these data,can be identified, travel times can be calculated, and generated. (Wikipedia, 2015)
Any situation where we have to divert the root. Also this situation using complex data structure. (aaai, 1993)
Any big political event or sports event arises complex data structure. (Wikipedia, 2015)
Task 4: The train leaves in 5 minutes
Big wooden logs are loaded onto open railroad cars. An inspector
measures the diameter of each log in order to calculate the volume of
the load. The work
progresses very slowly … the chief inspector suggests the work cannot be
finished on the day.
b. Adjusting volume to reduce the empty size
Ans:
We can recognize wicked problem by following operational constraints:(2). Recognize the characteristics of complex wicked problems
Ans:Some researcher believes that wicked problem have ten characteristics (ac4d, 2009)
5.Each and every solution to a wicked problem is “one shot operation” that means solution is directly implemented means solutions are not learnt by trial and error, which cause serious problem and consequences.
6.Wicked problems do not have a briefly explained set of potential solutions.
(3). recognize that computational solutions have wicked problem characteristics
Ans: In software engineering field, we can typically deals with complex and illustrated problems. In Wicked problems are basically characterized by following processes: (ac4d, 2009)
(4). reflect on how to adapt Paul Vickers
(How to think like a
programmer 2009) to handle wicked problems
Ans: The problem solving strategy to problems that
involve making choices and repeating things
•High-level control abstractions: sequence, selection, iteration
•Evaluating solutions.(paul vickers, 2015)
First three steps of the strategy,
•Understanding the problem
•Devising a plan to solve the problem
•Carrying out the plan . (paul vickers, 2015)
Paul Vickers :
1.Understanding the Problem
2.Devising a Plan to Solve the Problem
3.Carrying out the plan
4.Assessing the Result
5.Describing what you have Learned
6.Documenting the Solution
7.Pseudo Code
– Handout, pre-coding, coding and post-coding stages. (paul vickers,
2015)
• • • |
---|
Bubble Sort
1. Shuffle the cards before you start
O(1)
2. Lay them out in a line on the desk
O(1)
3. Start with the card on the left
O(n)
Merge Sort
1. Shuffle the cards before you start
2. Lay them out in a column of pairs on the desk
3. For each pair
1. Compare the two cards
2. Place them with the lowest card on the left and the highest card on
the right
4. end for
5. While there are still groups of cards
1. Split the groups into pairs of groups
2. Starting at the top pair of groups
3. While not at the bottom pair of groups
1. While both groups have cards
1. Compare the first two cards in the two groups of cards 2. Take the
lower card
3. Add to new group
2. end while
3. Move remaining cards in order to the end of the new group 4. Move to
next pair of groups
4. end while
6. end while
Evaluate the algorithm. Could it be improved?
Parallel Sort
1. Each person in the group takes a card
2. Form a row (order is irrelevant)
3. While cards not sorted
1. Every second person in the row starting from the left 1. Compare your
number with the person on your left
Reference:
Thangarwebsite:
In-text reference : (Tech_MX, 2012)
Abhijeet Patil, (2014, nov 03). credit card processing ( Entity Relationship Diagram). Retrieved from creately website: http://www.slideshare.net/Tech_MX/er-diagram-14155323
objectivism101.com/Lectures/Lecture13.shtml
In-text reference : (objectivism101, 2006)
eved from aaai website:
Ozzie Mascarenhas, (2009, May 1rom udmercy website:
rence : (udmercy, 2009)
e:
zeepedia, (2015). CHARACTERISTICS OF AN EFFECTIVE EVALUATION. Retrieved from