Assignment 1 Frontsheet Java - Compress
Assignment 1 Frontsheet Java - Compress
Assignment 1 Frontsheet Java - Compress
1>
Learner declaration:
I certify that the work submitted for this assignment is my own and research sources are fully acknowledged.
Grading grid
1
Assignment title Simulation in .NET for “Mobilize You”
In this assignment, you will have opportunities to provide evidence against the following criteria.
Indicate the page numbers where the evidence can be found.
2
1.3 critically evaluate
the components that
support the .NET
framework
3
The report should contain written
analysis to justify the design you
have produced in task 2. You
need to state what features have
2.2 explain the
been included/excluded and why
components and data
certain features have been used
and file structures
over others (where applicable)
required to implement
Example code can be used to
a given design
help clarify features. You should
include diagrams from your
design
4
Summative feedback
Assessor’s
Date
Signature
6
1.1 discuss the principles, characteristics and features of programming using a .NET
framework
o Type safety:
.NET framework performs operations on the values or objects for which .NET
framework requires each value or object has a type and which reference to the value
or object type
7
.NET framework manages the state of the object while executing the .NET
applications
.NET framework allows different version of the same application to run on the same
machine by using asemblies of different versions. Assemblies consist of IL code and
metadata. Where metadata determines the application dependencies. By this .NET
framework runtime executes multiple version of assembly and solves the major
problem of legacy development environment
Principles
Abstraction
The word abstract means a concept or an idea not associated with any specific
instance. In programming we apply the same meaning of abstraction by making
classes not associated with any specific instance.
The abstraction is done when we need to only inherit from a certain class, but not
need to instantiate objects of that class. In such case the base class can be regarded
as "Incomplete". Such classes are known as an "Abstract Base Class".
1. An Abstract Base class can not be instantiated; it means the object of that
class can not be created.
2. Class having abstract keyword and having, abstract keyword with some of its
methods (not all) is known as an Abstract Base Class.
3. Class having Abstract keyword and having abstract keyword with all of its
methods is known as pure Abstract Base Class.
8
4. The method of abstract class that has no implementation is known as
"operation". It can be defined as abstract void method ();
5. An abstract class holds the methods but the actual implementation of those
methods is made in derived class.
This is the Abstract Base Class, if I make both of its methods abstract then this class
would become a pure Abstract Base Class.
9
Now we derive a class of 'dog' from the class animal.
Here you can see we have 2 methods in the Abstract Base Class, the method eat()
has no implementation; that is why it is being declared as 'abstract' while the
method sound() has its own body so it is not declared as 'abstract'. In the derived
class we have the same name method but this method has it's body. We are doing
abstraction here so that we can access the method of derived class without any
trouble.
Inheritance
When creating a class, instead of writing completely new data members and
member functions, the programmer can designate that the new class should inherit
the members of an existing class. This existing class is called the base class, and
the new class is referred to as the derived class.
10
Polymorphism
You can have multiple definitions for the same function name in the same scope.
The definition of the function must differ from each other by the types and/or the
11
number of arguments in the argument list. You cannot overload function
declarations that differ only by return type.
Encapsulation
Encapsulation is defined 'as the process of enclosing one or more items within a
physical or logical package'. Encapsulation, in object oriented programming
methodology, prevents access to implementation details.
Public
Private
Protected
Internal
Protected internal
Private access specifier allows a class to hide its member variables and member
functions from other functions and objects. Only functions of the same class can
access its private members. Even an instance of a class cannot access its private
members.
Let us see an example of Department class. To manipulate the data in that class
(String departname) we define an accessor (get method) and mutator (set method).
12
Like the above way we can protect the private data from the outside world. Here we
use two separate methods to assign and get the required data.
In the above example we can't access the private data departname from an object
instance. We manipulate the data only using those two methods.
o Interoperability
13
guaranteeing certain properties and behaviors in the areas of memory
management, security, and exception handling.
o Language Independence
The .NET Framework introduces a Common Type System, or CTS. The CTS
specification defines all possible datatypes and programming constructs
supported by the CLR and how they may or may not interact with each other
conforming to the Common Language Infrastructure (CLI) specification. Because
of this feature, the .NET Framework supports the exchange of types and object
instances between libraries and applications written using any conforming .NET
language.
o Simplified Deployment
The .NET Framework includes design features and tools that help manage the
installation of computer software to ensure that it does not interfere with
previously installed software, and that it conforms to security requirements.
o Security
o Portability
14
o Common Language Runtime
Explains the features and benefits of the common language runtime, a run-time
environment that manages the execution of code and provides services that
simplify the development process.
o Assemblies
Defines the concept of assemblies, which are collections of types and resources
that form logical units of functionality. Assemblies are the fundamental units of
deployment, version control, reuse, activation scoping, and security permissions.
o Application Domains
o Runtime Hosts
15
o Cross-Language Interoperability
Describes mechanisms for protecting resources and code from unauthorized code
and unauthorized users.
Introduces the library of types provided by the .NET Framework, which expedites
and optimizes the development process and gives you access to system
functionality.
.NET is tiered, modular, and hierarchal. Each tier of the .NET Framework is a layer of
abstraction. .NET languages are the top tier and the most abstracted level. The
common language runtime is the bottom tier, the least abstracted, and closest to
the native environment. This is important since the common language runtime
16
works closely with the operating environment to manage .NET applications. The
.NET Framework is partitioned into modules, each with its own distinct responsibility.
Finally, since higher tiers request services only from the lower tiers, .NET is
hierarchal. The architectural layout of the .NET Framework is illustrated below.
17
Language interoperability is one goal of .NET. .NET languages share a common
runtime (the common language runtime, a common class library), the Framework
Class Library (FCL), a common component model, and common types. In .NET, the
programming language is a lifestyle choice. Except for subtle differences, C#,
VB.NET, or JScript.NET offer a similar experience.
.NET abstracts lower-level services, while retaining most of their flexibility. This is
important to C-based programmers, who shudder at the limitations presented in
Visual Basic 6 and earlier.
The .NET Framework Class Library (FCL) is a set of managed classes that provide
access to system services. File input/output, sockets, database access, remoting,
and XML are just some of the services available in the FCL. Importantly, all the .NET
languages rely on the same managed classes for the same services. This is one of
the reasons that, once you have learned any .NET language, you have learned 40
18
percent of every other managed language. The same classes, methods, parameters,
and types are used for system services regardless of the language. This is one of the
most important contributions of FCL.
1.3 critically evaluate the components that support the .NET framework
.NET Components
In-Process Components
In .NET, components built as DLLs run within the process space of the host
application and share memory and processor time with their host applications. At
run time, the component (which is part of the host application's assembly and is
referenced by its manifest) is loaded from disk and added to the host application's
process space. Because no remote procedure calls are generated to mediate
communication between the component and its host, setting and reading property
values, invoking methods, and responding to events raised by the component occurs
very quickly.
Out-of-Process Components
CLI Languages are computer programming languages that are used to produce
libraries and programs that conform to the Common Language Infrastructure (CLI)
19
specifications. With some notable exceptions, most CLI languages compile entirely
to the Common Intermediate Language (CIL), an intermediate language that can be
executed using an implementation of CLI such as the Common Language
Runtime (CLR, a part of the Microsoft .NET Framework), Mono, or Portable.NET. Some
of these languages also require the Dynamic Language Runtime (DLR).
Microsoft started development on the .NET Framework in the late 1990s originally
under the name of Next Generation Windows Services (NGWS). By late 2001 the first
beta versions of .NET 1.0 were released. [1] The first version of .NET Framework was
released on 13 February 2002, bringing managed code to Windows NT
4.0, 98, 2000, ME and XP.
Since the first version, Microsoft has released nine more upgrades for .NET
Framework, seven of which have been released along with a new version of Visual
Studio. Two of these upgrades, .NET Framework 2.0 and 4.0, have
upgraded Common Language Runtime (CLR). New versions of .NET Framework
replace older versions when the CLR version is the same.
The .NET Framework family also includes two versions for mobile or Embedded
device use. A reduced version of the framework, the .NET Compact Framework, is
available on Windows CE platforms, including Windows Mobile devices such
as smartphones. Additionally, the .NET Micro Framework is targeted at severely
resource-constrained devices.
20
3) Support for Code page encodings
4) Improvements to event tracing
1) Includes performance and debugging
4.5.1 Visual Studio 2013
improvements
2) Support for automatic binding redirection
3) Expanded support for Windows Store apps
1) Features Enhancements to CLR 4.0
4.5 Visual Studio 2012
2) Async Support
3) Support for building Windows Store apps
4) Features Enhancement to WPF, WCF, WF,
and ASP.NET
1) Introduced CLR 4.0
4.0 Visual Studio 2010
2) Managed Extensibility Framework (MEF)
3) Dynamic Language Runtime (DLR)
4) Task Parallel Library
1) Built-In AJAX Support
3.5 Visual Studio 2008
2) LINQ
3) Dynamic Data
4) Multi-targeting Framework Support
1) Windows Presentation Foundation (WPF)
3.0 Visual Studio 2005
2) Windows Communications Foundation
(WCF)
3) Windows Workflow Foundation (WF), and
CardSpace
1) Introduced CLR 2.0
2.0 Visual Studio 2005
2) Generics and generic collections
3) Partial classes
4) Nullable types
5) Anonymous methods
6) Introduced many new controls and features
to ASP.NET
1) Features Enhancement to ASP.NET and
1.1 Visual Studio .NET
ADO.NET
2003
2) Built-in support for mobile ASP.NET controls
3) Security Enhancement
4) Built-in support for ODBC and databases
5) Internet Protocol version 6 (IPv6) support
1) Introduced CLR 1.0
1.0 Visual Studio .NET
2) Support for Object-oriented Web
application development
21
3) Use of DLL class libraries
A system has been designed for vehicle rental system, there is only manager can
use the system
Sale staff: this user can add – update – delete – view customer, vehicle, rent
Admin: this user can view report of the rent management system
22
ERD
23
Draft UI Design
24
Class Diagram
25
26
27
2.2 explain the components and data and file structures required to implement a
given design
Components Details
28
CrystalReport1: this is crystal report, it
is used to report for the application
frmMain: this is main frame of the
application
frmLogin: this is login frame to the
system
frmCustomer: this is customer frame, it
performs customer’s features such as
add – update – delete - view
frmVehicle: this is vehicle frame, it
performs vehicle’s features such as add –
update – delete - view
frmRent: this is customer frame, it
performs rent’s features such as add –
update – delete – view
frmReport: this frame is used to report
for the application
29
Number Variable name Class Value type Initial value
1 id Vehicle String null
2 name Vehicle String null
3 make Vehicle String null
4 addon Vehicle String null
5 registyear Vehicle String null
6 rentperday Vehicle float null
7 vehicletype Vehicle String null
8 id Rent String null
9 customerid Rent String null
10 productid Rent String null
11 rentdate Rent String null
12 returndate Rent String null
13 total Rent float null
14 phone Customer String null
15 address Customer String null
16 ssn Customer String null
17 name customer String null
30
o .NET Framework is heavily invested by one of the world’s richest
organizations
o Skill base development in .NET is deliberate, schools of training exist, but
unlike in Java, the framework is pretty much the same against hoards of
optional frameworks as it is with Java
o MSDN library is well maintained and MVP’s are avialable with enough
recognition to address challenging product development issues
o Highly scalable robust and far more secure in its code base protection
against the Open Source coding languages which at times need code
obfuscation
o Backward compatibility apart, has full service coverage of everything that
technology has to offer towards software product development
o Is the only framework which comes with Software Development Kits and
Methodologies of Microsoft, thus enabling the eons of challenge with
‘Getting the Product Right’ at one go.
o Built for security as in Proprietary code level security, cannot be replaced
for its compilation levels except when doing programming based on C or
C++
o Is not reliant on community for updates and version upkeeps
o Brings systemic approach towards software architecture and applies to
various Enterprise Architecture Schools and Support Systems Integration,
Cross Platform Development and Mobile, Cloud Computing through the
Azure Cloud Platforms
Advantages of .NET
31