Professional Documents
Culture Documents
CMP 312 LECURE MATERIAL
CMP 312 LECURE MATERIAL
DELTA STATE
FACULTY OF ARTS
COURSE CONTENTS
1. Introduction
2. Web Design
3. Graphic Design
4. Use of the Internet
5. Computer Programming
2023/2024
The intersection of computer technology and the arts has undergone a profound
evolution, reshaping how art is created, experienced, and distributed. This journey
began in the mid-20th century, as computers transitioned from being purely scientific
tools to becoming integral components in artistic exploration. In the 1960s and 1970s,
pioneering artists and technologists began experimenting with computers to generate
visual art. Early computer graphics were rudimentary, constrained by the limited
processing power and graphical capabilities of the time. However, these initial forays
laid the groundwork for more sophisticated digital art forms. One notable example is the
work of Frieder Nake, a German mathematician and computer scientist, who used
algorithms to produce intricate geometric patterns, highlighting the potential of
computers to create complex and precise designs.
History of Computers
The advent of personal computers and advancements in software during the 1980s and
1990s significantly broadened the scope of digital art. Programs like Adobe Photoshop,
which was first released in 1988, revolutionized graphic design and photo editing,
providing artists with powerful tools to manipulate images with unprecedented
flexibility and precision. This period also saw the rise of digital illustration and
animation, as software such as CorelDRAW and Adobe Illustrator enabled artists to
produce intricate vector graphics and animations. As computer technology continued to
advance, it began to integrate more seamlessly with traditional artistic practices. Artists
started to use digital tools alongside traditional media, combining the tactile experience
of painting or sculpting with the versatility of digital manipulation. This hybrid
approach allowed for greater experimentation and the development of new artistic
styles. For instance, digital printmaking emerged as a method for artists to produce
high-quality prints of their work, blending the precision of digital design with the
aesthetic qualities of traditional print techniques.
The rise of the internet and digital platforms has profoundly impacted the distribution
and accessibility of art. Online galleries, social media, and digital marketplaces have
democratized the art world, allowing artists to reach global audiences without the need
for physical gallery spaces. This shift has also changed how art is consumed, with digital
reproductions making it possible for people to experience and engage with artworks
from anywhere in the world. Additionally, virtual reality (VR) and augmented reality
(AR) technologies have opened new avenues for immersive art experiences, enabling
viewers to interact with art in dynamic and innovative ways. In recent years, emerging
technologies such as artificial intelligence (AI) and machine learning have begun to play
a significant role in the arts. AI-powered tools can generate music, poetry, and visual
art, challenging traditional notions of creativity and authorship. Artists are increasingly
Computers have revolutionized the way historical data is stored, processed, and
accessed. Digital archives preserve vast amounts of information, ensuring that historical
documents are preserved for future generations. Advanced computing enables
historians to analyze large datasets, identifying patterns and trends that were previously
impossible to detect. Digital libraries and online databases have made historical
documents and scholarly articles more accessible to researchers worldwide. Computers
facilitate collaboration among historians through online platforms, enabling the sharing
of ideas and resources. Educational platforms offer history courses and resources,
making history education more accessible to a global audience. Multimedia
presentations, virtual reality (VR), and interactive simulations provide engaging ways to
learn about historical events and periods. Computers can create detailed simulations of
historical events, allowing historians to test hypotheses about how events might have
unfolded under different circumstances. 3D modeling and virtual reconstructions
provide insights into ancient civilizations and historical sites. Computers have
transformed the way people communicate, making it possible to send messages
instantly across the globe. Platforms like Facebook, Twitter, and LinkedIn have
redefined social interactions, enabling people to maintain connections and form new
relationships regardless of geographic barriers. Computers have enabled the formation
of online communities where people with shared interests can connect and interact.
Online forums and support groups provide a platform for individuals to seek advice,
share experiences, and offer support. Advances in computing technology have facilitated
the rise of remote work, allowing people to collaborate and work together from different
locations. Software tools like Slack, Trello, and Asana enhance team collaboration and
project management. Platforms like YouTube, TikTok, and Instagram enable users to
create, share, and engage with content, fostering new forms of social interaction.
Computers enable cross-cultural communication and exchange, allowing people to learn
about and appreciate different cultures. Language learning apps and online courses help
bridge language barriers, enhancing understanding and communication between
different linguistic groups. Computers have profoundly influenced both history and
human relations, transforming how humans store and analyze historical data,
communicate, collaborate, and interact. They continue to shape human understanding
of the past and their relationships in the present, highlighting the integral role of
technology in human development.
Software like Ableton Live, Logic Pro, and Finale allow composers to create, arrange,
and edit music digitally. Algorithms and AI can assist in generating new compositions or
enhancing existing ones. Tools like DanceForms and LifeForms help choreographers
visualize and plan dance routines, experimenting with movements and sequences before
live rehearsals. Computers power electronic instruments and MIDI controllers,
expanding the range of sounds and possibilities for live performances. Motion capture
and interactive technology enable performances that respond to the movements and
actions of performers in real-time, creating dynamic and immersive experiences.
Lighting and Sound Design: Software like Lightwright and QLab allows designers to
create intricate lighting and soundscapes, synchronizing them with the performance. 3D
modeling and virtual reality (VR) tools help set designers visualize and create detailed
stage environments. Virtual sets can be projected or used in augmented reality (AR) to
enhance live performances. Virtual Rehearsals: Virtual reality (VR) environments can
simulate performance spaces, allowing performers to rehearse in a virtual setting when
physical spaces are unavailable. Applications and software provide musicians and actors
with tools for practice, including metronomes, tuners, and virtual coaches. Live
Streaming: Platforms like YouTube, Twitch, and specialized services like Digital Theatre
allow performances to be streamed live, reaching a global audience. With advancements
in technology, entire performances can be created and experienced virtually, offering
new forms of artistic expression. Social Media and Promotion: Computers enable artists
and organizations to market performances through social media, email campaigns, and
websites, engaging with audiences directly. Mobile apps and interactive websites offer
audiences additional content, such as behind-the-scenes footage, artist interviews, and
interactive programs. Performance Analytics: Software can analyze various aspects of a
performance, such as audience engagement and reaction, helping artists and producers
make data-driven decisions. Technologies like audience response systems and real-time
feedback tools allow performers to interact with their audience during a live show,
creating a more engaging experience. Computers have revolutionized the performing
arts by providing new tools for creation, enhancing live performances, and expanding
the reach and accessibility of artistic works. From digital composition and interactive
staging to virtual rehearsals and global live streaming, technology continues to push the
boundaries of what is possible in the performing arts.
Philosophy:
Web Design refers to the process of creating websites, encompassing several aspects
including webpage layout, content production, and graphic design. It is essential for
digital presence, user engagement, and achieving business goals. A well-designed
website enhances user experience and boosts credibility.
1. Planning
Create a Sitemap: Outline the structure and organization of the website's pages.
Create detailed designs using graphic design software using Adobe XD, Photoshop.
Structure and style the content using HTML for structure and CSS for styling. Add
interactivity and dynamic elements. Example: Image sliders, form validations using
JavaScript
Ensure compatibility across different browsers using Chrome, Firefox, Safari, Microsoft
Edge. Check the website on various devices and screen sizes. Compress images, minify
CSS and JavaScript files using tools like Google PageSpeed Insights.
Upload Files using FTP or hosting tools to upload the website files.
Introduction to HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<main>
<p>This is my first HTML page. I'm learning how to create websites!</p>
</main>
<footer>
<p>© 2024 My Website</p>
</footer>
</body>
</html>
Headings
<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Sub-subheading</h3>
Paragraphs
<a href="https://www.example.com">
Images
Images are embedded using the <img> tag, which must include the src attribute
(meaning source of the image).
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
3. HTML Attributes
HTML elements can have attributes, providing additional information about the
element. Common attributes include class, id, and style.
4. Semantic HTML
Semantic HTML introduces meaning to the web page rather than just presentation.
Common semantic elements include:
<article></article>
<aside></aside>
<details></details>
<figcaption></figcaption>
<figure></figure>
<footer></footer>
<header></header>
<main></main>
<nav></nav>
<section></section>
<summary></summary>
<time></time>
Example of Semantic HTML
<article>
<header>
<h2>Article Title</h2>
<p>Published on <time datetime="2024-06-10">June 10, 2024</time></p>
</header>
<section>
<p>This is a section of the article.</p>
</section>
<footer>
<p>Author: John Doe</p>
</footer>
</article>
5. Forms
Forms are used to collect user input. The <form> element encompasses the form fields
and submission buttons.
6. Multimedia
HTML supports embedding audio and video using the <audio> and <video> tags.
Audio
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Video
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Example
<header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
Example of a Website
Task: To create a simple website for a fictional cafe called "Café Delight." This website
will have a homepage, a menu page, and a contact page.
Graphic design is the art and practice of visual communication. It involves creating
visual content to convey messages, ideas, and information effectively and aesthetically.
Graphic design is a versatile and rewarding field that requires creativity, technical skill,
and a deep understanding of design principles. Essential graphic design tools include:
Adobe Photoshop, Canva, Stetch, Stigma etc.
Adobe Photoshop:
Adobe Photoshop is a versatile and essential tool for image editing, graphic design, and
digital art creation.
Interface Overview
Menu Bar: Contains various commands and options for working with images.
Toolbox: Houses a wide range of tools for editing and creating images.
Layers Panel: Displays layers, allowing for non-destructive editing and
compositing.
Properties Panel: Provides options and settings for selected tools or layers.
Selection Tools
Editing Tools
Creating Layers: Click the "New Layer" icon in the Layers panel.
Layer Mask: Hide or reveal portions of a layer without permanently erasing
them.
Blending Modes: Blend layers together to create different effects (e.g., Multiply,
Screen, Overlay).
Spot Healing Brush: Quickly remove blemishes and imperfections from images.
Clone Stamp Tool: Clone pixels from one area to another to retouch or remove
objects.
Use the Text Tool (T) to add text layers to your design.
Experiment with different fonts, sizes, and styles to achieve desired typography.
Brushes: Customize brush settings such as size, hardness, opacity, and flow.
Drawing Tablets: Utilize pressure-sensitive drawing tablets for more precise and
natural drawing/painting.
Apply layer styles (e.g., Drop Shadow, Stroke, Gradient Overlay) to add depth and
dimension to layers.
Saving Files
Go to File > Save to save a Photoshop (.psd) file with layers intact for future
editing.
Use File > Save As to save a copy of the file in different formats such as JPEG,
PNG, or PDF.
Go to File > Export > Export As to export images for web use, adjusting settings
such as quality and file format (e.g., JPEG, PNG).
For print, ensure images are saved in CMYK color mode and at appropriate
resolution (usually 300 dpi).
Canva:
Canva is an online graphic design platform that allows users to create a wide range of
visual content, including social media graphics, presentations, posters, and more. Canva
is a versatile and user-friendly tool for creating stunning graphic designs, even for
beginners.
Visit the Canva website (www.canva.com) and sign up for a free account.
Alternatively, log in with your existing Google or Facebook account.
Interface Overview
Choosing a Template
Templates
Elements
Text
Add text to your designs using a variety of fonts, styles, and colors.
Customize text elements by adjusting size, alignment, spacing, and effects.
Uploads
Upload your own images, logos, and other assets to use in your designs.
Organize uploaded files into folders for easy access and management.
Keep It Simple
Maintain consistency in colors, fonts, and design style across your projects.
Use Canva's "Brand Kit" feature to save brand colors, fonts, and logos for easy
access.
Collaboration
Share your designs directly from Canva via email, social media, or link.
Download designs for printing or use the "Publish" feature to share them online.
The Internet is a vast network of interconnected computers that allows users to access
and share information globally. In this tutorial, we'll cover the basics of the Internet,
how it works, and how to use it effectively. The Internet has become an indispensable
tool for communication, information sharing, and commerce in today's digital age. By
understanding how the Internet works and following best practices for online safety and
security, users can make the most of this powerful resource while protecting themselves
from potential risks and threats.
URL (Uniform Resource Locator): A web address that identifies the location of a
resource on the Internet (e.g., https://www.example.com).
Browser: Software used to access and view websites and web content (e.g.,
Google Chrome, Mozilla Firefox).
Website: A collection of web pages hosted on a server and accessible via the
Internet.
Search Engine: A tool that allows users to search for information on the Internet
(e.g., Google, Bing).
Hyperlink: A clickable link that directs users to another web page or resource.
Open your web browser and enter a URL in the address bar to visit a website.
Navigate between web pages by clicking on hyperlinks or using the browser's
back and forward buttons.
Use Search engines to find information on specific topics by entering keywords or
phrases.
Send and receive emails using email services like Gmail, Outlook, or Yahoo Mail.
Use messaging apps and social media platforms to connect with friends, family,
3. Internet Safety and Security
Key Concepts
Development Process
Best Practices
Readability: Write code that is clear, concise, and easy to understand for yourself
and others.
Python is a high-level, interpreted programming language known for its simplicity and
readability. Python is widely used in various domains, including web development, data
science, machine learning, and automation. Its simplicity and ease of learning makes it
an ideal choice for beginners and professionals alike. Practical Application of Python
includes Web Development which uses frameworks like Django and Flask for building
web applications
Installing Python:
Download and install the latest version of Python from the official website
(https://www.python.org).
Optionally, use package managers like Anaconda or pip to manage Python
packages and environments.
Python Basics:
Variables: Containers for storing data values, such as numbers, strings, lists,
tuples, dictionaries, and more.
Data Types: Numeric (int, float), String, List, Tuple, Dictionary, Boolean, and
more.
Operators
Control Flow
Example 1:
The factorial of a non-negative integer n is the product of all positive integers less than
or equal to n. It is denoted by n!. Mathematically, n! = n * (n-1) * (n-2) * ... * 1.
def factorial(n):
# Base case: Factorial of 0 is 1
if n == 0:
return 1
else:
# Recursive case: Factorial of n is n * factorial(n-1)
return n * factorial(n-1)
Example 2”
def sum_of_odd_numbers():
odd_sum = 0
count = 0
number = 1
while count < 10:
odd_sum += number
number += 2 # Increment to the next odd number
return odd_sum
Example 3:
def sum_of_even_numbers():
even_sum = 0
count = 0
number = 2
return even_sum
Download and install the latest version of JDK from the official Oracle website
(https://www.oracle.com/java/technologies/javase-jdk11-downloads.html).
Set up environment variables (JAVA_HOME and PATH) to point to the JDK
installation directory.
Java Basics:
Java programs are organized into classes, each containing methods that define
the program's behavior.
Statements end with semicolons (;) and blocks of code are enclosed in curly
braces ({}).
Java supports various data types, including primitive types (int, double, boolean)
and reference types (String, arrays, objects).
Variables must be declared with a data type before use, and their values can be
assigned using the assignment operator (=).
Arithmetic Operators: +, -, *, /, %.
Relational Operators: ==, !=, <, >, <=, >=.
Logical Operators: &&, ||, !.
Control Flow
Classes define the blueprint for creating objects with properties (attributes) and
behaviors (methods).
Objects are instances of classes, created using the new keyword.
Encapsulation
Inheritance
Polymorphism
Class: A blueprint for creating objects. It defines a set of attributes and methods
that the created objects will have. For example, an OOP in Jave is illustrated as”
void drive() {
System.out.println("The car is driving.");
}
}
Object: An instance of a class. It is created from the class blueprint and has the
properties and methods defined by the class.
Encapsulation is the bundling of data (attributes) and methods that operate on the data
into a single unit (class). It restricts direct access to some of an object's components,
which can help prevent unintended interference and misuse.
Inheritance allows a new class to inherit attributes and methods from an existing class.
The new class (subclass) can add its own attributes and methods and override methods
from the parent class (superclass).
Polymorphism allows objects to be treated as instances of their parent class rather than
their actual class. This enables methods to use objects of different classes
interchangeably.
Abstraction is the concept of hiding the complex implementation details and showing
only the essential features of an object. It can be achieved using abstract classes and
interfaces.
Example:
Here's a step-by-step guide to developing a basic website for philosophy, history, and
performing arts using Flask:
Install Flask
First, make sure you have Python installed. Then, you can install Flask using pip:
2. Project Structure
philosophy_history_arts
│
├── app.py
├── templates
│ ├── base.html
│ ├── index.html
│ ├── philosophy.html
│ ├── history.html
│ ├── arts.html
└── static
├── styles.css
3. Flask Application
app.py
This is the main file where the Flask application will be defined.
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/philosophy')
def philosophy():
return render_template('philosophy.html')
@app.route('/history')
def history():
return render_template('history.html')
@app.route('/arts')
def arts():
if __name__ == '__main__':
app.run(debug=True)
4. HTML Templates
templates/base.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Philosophy, History, and Performing Arts</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<header>
<h1>Philosophy, History, and Performing Arts</h1>
<nav>
<ul>
<li><a href="{{ url_for('index') }}">Home</a></li>
<li><a href="{{ url_for('philosophy') }}">Philosophy</a></li>
<li><a href="{{ url_for('history') }}">History</a></li>
<li><a href="{{ url_for('arts') }}">Arts</a></li>
</ul>
</nav>
</header>
<main>
{% block content %}{% endblock %}
</main>
</body>
</html>
templates/index.html
{% extends 'base.html' %}
{% block content %}
<h2>Welcome to Philosophy, History, and Performing Arts</h2>
<p>Explore the realms of philosophy, delve into the depths of history, and experience
the beauty of performing arts.</p>
{% endblock %}
{% extends 'base.html' %}
{% block content %}
<h2>Philosophy</h2>
<p>Philosophy is the study of general and fundamental questions about existence,
knowledge, values, reason, mind, and language.</p>
{% endblock %}
templates/history.html
html
Copy code
{% extends 'base.html' %}
{% block content %}
<h2>History</h2>
<p>History is the study of the past as it is described in written documents. It
encompasses various periods, events, and notable figures.</p>
{% endblock %}
templates/arts.html
html
Copy code
{% extends 'base.html' %}
{% block content %}
<h2>Performing Arts</h2>
<p>The performing arts include a wide range of activities such as theater, music, dance,
and other forms of performance.</p>
{% endblock %}
5. Static Files
static/styles.css
css
header {
background-color: #333;
color: white;
padding: 1rem;
text-align: center;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 1rem;
}
nav ul li a {
color: white;
text-decoration: none;
}
main {
padding: 2rem;
}
To run the application, navigate to the project directory in your terminal and execute:
python app.py
Please Note: The following course assignments will be used to assess students’
understanding of the general course. In addition, it will used to generate part of the
scores that makeup students’ CA. hence, a total score of 10 marks will be allocated for
this course assignment.
2. Using OOP and Java with Apache Struts, create a simple website to allow for digital
stage rehearsal (performing Arts students only), archival of historical information (for
history and international relation students only) and reasoning, assisting in the
development and testing of logical proofs and arguments (for philosophy students only).