comp Fundamental Lab Report 1-6
comp Fundamental Lab Report 1-6
Objective:
INTRODUCTION OF REPORT WRITING IN MS WORD.
Abstract:
This report introduces the fundamentals of report writing using Microsoft Word, a widely
employed word processing tool. It explores the essential elements of creating well-structured
and visually appealing reports, encompassing topics such as document formatting, layout design,
and the utilization of features unique to MS Word. The report aims to equip users with the
knowledge and skills necessary to produce professional and effective reports in various
academic and professional settings. Through step-by-step guidance and practical examples, this
introduction serves as a valuable resource for individuals seeking proficiency in report writing
within the MS Word environment
Theory:
1. Header:
Start your report with a header that includes essential information such as the title of the report,
the author's name, the date, and possibly the name of the organization or course.
2. Title:
Clearly state the title of your report. This should be concise but informative, providing readers
with a clear idea of the report's subject.
## [Report Title]
3. Opening Statement:
Craft an opening statement that captures the reader's attention and introduces the topic of the
report. This could be a brief summary or a thought-provoking statement related to the subject
matter.
The following report examines [topic], shedding light on [key points or issues] and providing
valuable insights into [purpose or objective].
1
Mechanical Engineering Department, University of Wah, Wah Cantt
4. Background Information:
Provide necessary background information to contextualize the report. Include any relevant
details that will help readers understand the context and importance of the report.
In recent years, [industry/field] has witnessed significant changes due to [relevant events or
developments]. Understanding these shifts is crucial for [reason for conducting the report].
5. Objectives:
Clearly outline the objectives of the report. What do you aim to achieve or investigate? This
gives readers a roadmap for what to expect.
This report seeks to [objective 1], [objective 2], and [objective 3], with the ultimate goal of [overall purpose].
The scope of this report encompasses [specific aspects], while it is important to note the limitations, including
[limitations or constraints].
7. Significance:
Explain why the report is relevant or important. Highlight the potential impact of the findings
and why readers should continue reading.
Understanding [topic] is crucial in [industry/field], and the insights provided in this report can contribute to
[benefits or improvements]
The following sections delve into [key aspects], providing a comprehensive analysis of [topic]. Each section
contributes to the overall understanding of [report focus]
9. Formatting Tips:
Use a clear and legible font.
Maintain consistency in formatting (font size, spacing, and headings).
Consider using bullet points or numbering for lists to enhance readability.
Conclusion:
The introduction of report writing in MS Word provides a user-friendly and efficient platform
for creating, editing, and formatting professional reports. With its diverse set of features,
including templates, formatting options, and collaborative tools, MS Word streamlines the report
writing process, enhancing overall productivity and document quality. This integration not only
simplifies the creation of well-structured reports but also allows for seamless collaboration,
ensuring a more organized and effective approach to document preparation.
THE END
2
Mechanical Engineering Department, University of Wah, Wah Cantt
WEC
DEPARTMENT OF MECHANICAL ENGINEERING TECNOLOGY
WEC/MET/COMP/LAB NO. 02
Objective:
CREATE TABLE OF CONTENT, REFERENCE AND CAPTION IN MS WORD.
Abstract:
Creating a table of contents, references, and captions in Microsoft Word 2013 involves several
steps to organize and enhance the structure of a document. The process begins with the insertion
of headings and subheadings throughout the document, ensuring consistent formatting.
Subsequently, the user can generate a table of contents that dynamically updates as the
document evolves. To include references, users can employ the citation and bibliography
features, allowing for the creation of a comprehensive and standardized reference list.
Additionally, inserting captions for figures, tables, and other elements is achieved through the
"Insert Caption" feature, enhancing document clarity. This abstract provides a concise overview
of the key steps involved in creating a well-organized and professionally formatted document in
Microsoft Word.
Procedure:
TABLE OF CONTENTS:
REFERENCES:
1
Mechanical Engineering Department, University of Wah, Wah Cantt
d) To add a bibliography:
1. Click where you want to insert the bibliography.
2. Click on "Bibliography" in the toolbar.
3. Choose a style for the bibliography, or click "Insert Bibliography" for more options.
CAPTIONS:
f) Updating Captions:
1. To update captions after making changes:
2. Right-click on a caption.
3. Select "Update Field" or click inside the caption and press F9.
Conclusion:
In conclusion, mastering the creation of tables of contents, references, and captions in Microsoft
Word is an essential skill for effective document organization and presentation. By employing
these features, users can enhance the clarity and professionalism of their documents, making it
easier for readers to navigate and understand the content. Whether it's for academic papers,
reports, or other professional documents, the ability to seamlessly incorporate tables of contents,
references, and captions contributes to a polished and well-structured final product. With a solid
understanding of these tools, users can save time, improve document consistency, and present
information in a visually appealing manner, ultimately elevating the quality of their work.
THE END
2
Mechanical Engineering Department, University of Wah, Wah Cantt
WEC
DEPARTMENT OF MECHANICAL ENGINEERING TECNOLOGY
WEC/MET/COMP/LAB NO. 03
Objective:
INTRODUCTION TO CODE BLOCK SOFTWARE INSTALLATION.
Abstract:
This document serves as a comprehensive introduction to the installation process of code block
software, elucidating the fundamental steps and considerations for a seamless setup. Covering a
spectrum of programming languages and environments, the guide outlines the importance of
code blocks in development workflows. It navigates through common challenges, offering
practical solutions and troubleshooting insights. Whether for beginners seeking a robust
development environment or experienced programmers exploring new tools, this introduction
provides a valuable resource for the successful installation of code block software.
Procedure:
Installing Code::Blocks on Windows 10 is a straightforward process. Code::Blocks is an open-
source, cross-platform IDE (Integrated Development Environment) that supports multiple
compilers, including GCC. Here's a step-by-step procedure for installing Code::Blocks on
Windows 10:
a) Download Code::Blocks:
Visit the official Code::Blocks website: http://www.codeblocks.org/.
Click on the "Downloads" tab.
Choose the appropriate version for your system. Look for the Windows download with the
"codeblocks-xx.xx-setup.exe" format.
b) Run the Installer:
Once the installer is downloaded, double-click on the file to run it.
c) Select Components:
The installer will prompt you to select components. You can choose the default components
or customize the installation by selecting or deselecting options. For most users, the default
options are sufficient.
d) Select Compiler:
During the installation, you will be prompted to select a compiler. If you don't have a specific
preference, you can choose the bundled MinGW compiler that comes with Code::Blocks.
This compiler is suitable for C and C++ development.
e) Installation Path:
Choose the installation path for Code::Blocks. The default path is usually fine for most users.
f) Additional Tasks:
The installer may ask if you want to create shortcuts or associate certain file types with
Code::Blocks. Make your selections based on your preferences.
1
Mechanical Engineering Department, University of Wah, Wah Cantt
g) Complete the Installation:
Proceed with the installation by clicking the "Next" button, and then click "Install" to start the
installation process.
h) Finish Installation:
Once the installation is complete, click on the "Finish" button.
i) Launch Code::Blocks:
After installation, you can launch Code::Blocks from the desktop shortcut or the Start menu.
j) Configure Compiler (if needed):
If you selected the MinGW compiler during installation, you might need to configure it. Open
Code::Blocks, go to "Settings" > "Compiler" > "Global compiler settings." Choose the
compiler you installed and make any necessary adjustments.
Conclusion:
In conclusion, the introduction of code block software installation plays a pivotal role in
enhancing the efficiency and functionality of programming environments. By simplifying the
process of installing and managing software components, developers can focus more on their
core tasks, leading to increased productivity and smoother collaboration. The use of code block
software installation not only streamlines the development workflow but also contributes to a
more robust and reliable coding environment. As technology continues to evolve, embracing
efficient installation practices becomes essential for staying competitive in the rapidly changing
landscape of software development. In adopting and adapting to these advancements, developers
empower themselves to create innovative and high-quality solutions while minimizing the
complexities associated with software setup and maintenance.
THE END
2
Mechanical Engineering Department, University of Wah, Wah Cantt
WEC
DEPARTMENT OF MECHANICAL ENGINEERING TECNOLOGY
WEC/MET/COMP/LAB NO. 04
Objective:
BASICS OF C++ LANGUAGE.
Abstract:
This document serves as an introductory guide to the fundamentals of the C++ programming
language. C++ is a versatile and powerful programming language widely used for system
software, game development, and application programming. The document covers key concepts,
syntax, and features essential for understanding and writing C++ code. Topics include data types,
variables, control structures, functions, and object-oriented programming principles. Through
clear explanations and illustrative examples, readers will gain a solid foundation in C++ basics,
enabling them to embark on more advanced programming tasks with confidence.
Procedure:
The basics of the C++ programming language involve understanding fundamental concepts and
syntax that form the foundation for writing C++ programs. Here are some key aspects of the
basics of C++:
a) Syntax:
C++ syntax is similar to that of C, but with additional features.
Statements end with a semicolon (;).
Blocks of code are enclosed in curly braces ({}).
c) Operators:
Arithmetic operators: +, -, *, /, %.
Relational operators: ==, !=, <, >, <=, >=.
Logical operators: &&, ||, !.
1
Mechanical Engineering Department, University of Wah, Wah Cantt
d) Control Flow:
if, else if, else statements for conditional execution.
for, while, do-while loops for iteration.
if (condition) {
// code block executed if condition is true
} else {
// code block executed if condition is false
}
for (int i = 0; i < 5; ++i) {
// code executed in each iteration
}
e) Functions:
Functions are reusable blocks of code.
Functions can have parameters and return values.
int add(int a, int b) { return a + b; }
f) Arrays:
Arrays are used to store multiple values of the same type.
int numbers[5] = {1, 2, 3, 4, 5};
h) Pointers:
Pointers store memory addresses.
Used for dynamic memory allocation and manipulation.
int x = 10; int *ptr = &x;
i) File Handling:
C++ provides features for reading from and writing to files.
#include <fstream> std::ofstream outfile("example.txt"); outfile << "Hello, C++!"; outfile.close();
Conclusion:
In conclusion, mastering the basics of the C++ language is essential for building a solid
foundation in programming and software development. Proficiency in these fundamental
concepts enables developers to write efficient, modular, and maintainable C++ code.
THE END
2
Mechanical Engineering Department, University of Wah, Wah Cantt
WEC
DEPARTMENT OF MECHANICAL ENGINEERING TECNOLOGY
WEC/MET/COMP/LAB NO. 05
Objective:
DEVELOP PROGRAM TO ASSIGN VALUES TO VARIABLES AND
CONSTANTS
Abstract:
In the development process of a program designed to assign values to variables and constants,
various key tasks were accomplished. The project involved creating a structured system to
facilitate the assignment of values to variables and constants within a programming environment.
The initial phase of the development process focused on defining and declaring variables and
constants, establishing their data types, and allocating memory space accordingly. This step was
crucial for ensuring efficient storage and retrieval of values during program execution.
Following the declaration phase, the program logic was implemented to assign specific values to
the declared variables and constants. This involved the use of assignment operators and
adherence to the programming language's syntax and rules. The development team paid careful
attention to handling data types appropriately to prevent potential errors or inconsistencies.
Procedure:
Step1. Open a Text Editor or an Integrated Development Environment (IDE).
Choose a text editor or an IDE to write your C++ code. Popular choices include Visual Studio Code,
Code::Blocks, or any other C++ IDE you prefer.
Step2. Create a New C++ File.
Start a new C++ source file with a .cpp extension. For example, you can name it main.cpp.
Step3. Include Necessary Headers.
In the beginning of your file, include any necessary header files. For basic input and output operations,
include the <iostream> header.
#include <iostream> using namespace std;
Step4. Declare Variables and Constants.
Declare the variables and constants that you'll be using in your program. Variables hold values that can
change during the program execution, while constants have fixed values.
1
Mechanical Engineering Department, University of Wah, Wah Cantt
Step5. Assign Values to Variables and Constants.
Assign values to your variables and constants. You can do this using the assignment operator =.
myInteger = 42; myDouble = 3.14; // Constants cannot be changed once assigned // PI = 3.0; // This
would result in a compilation error
Step6. Use Variables and Constants.
Perform any operations or output involving the variables and constants in your program.
cout << "Integer value: " << myInteger << endl; cout << "Double value: " << myDouble << endl; cout <<
"Value of PI: " << PI << endl;
Step7. Compile and Run.
Save your file and compile it using a C++ compiler. If you're using an IDE, there will be an option to build
and run your program. If you're using a command-line compiler, use commands like g++ to compile and
then run the executable.
Step8. Review and Debug.
Check the output and make sure your program is working as expected. If there are errors, review your
code and make corrections.
Conclusion:
In conclusion, developing a program to assign values to variables and constants in C++ is a
fundamental aspect of programming. This process involves declaring variables and constants,
specifying their data types, and assigning appropriate values to them. The program should
adhere to the principles of good coding practices, such as clarity, readability, and maintainability.
By creating such a program, you gain a foundational understanding of variable and constant
usage in C++, which is essential for more complex programming tasks. This knowledge lays the
groundwork for further exploration into data manipulation, control flow, and the development of
more sophisticated applications.
In summary, mastering the creation of programs that assign values to variables and constants is a
crucial step in becoming proficient in C++ programming and sets the stage for more advanced
software development endeavors.
THE END
2
Mechanical Engineering Department, University of Wah, Wah Cantt
WEC
DEPARTMENT OF MECHANICAL ENGINEERING TECNOLOGY
WEC/MET/COMP/LAB NO. 06
Objective:
PRACTICE DIFFERENT PROGRAMS IN C++.
Abstract:
This lab report documents the exploration of diverse programming challenges in C++,
undertaken with the aim of enhancing proficiency and versatility in the language. A randomized
approach was adopted to select a range of programs, covering fundamental and advanced
concepts such as data structures, algorithms, and object-oriented programming. The exercises
encompassed tasks like sorting algorithms, dynamic memory management, file handling, and
implementation of complex data structures.
int main() {
cout << "Hello, World!" << endl;
return 0;
}
Program 2: Variables and User Input
Objective: Demonstrate variable declaration and user input.
Example:
#include <iostream>
using namespace std;
int main() {
int age;
cout << "Enter your age: ";
cin >> age;
cout << "Your age is: " << age << endl;
return 0;
}
1
Mechanical Engineering Department, University of Wah, Wah Cantt
Program 3: Control Structures (if-else)
Objective: Implement conditional statements.
Example:
#include <iostream>
using namespace std;
int main() {
int num;
cout << "Enter a number: ";
cin >> num;
if (num % 2 == 0) {
cout << num << " is even." << endl;
} else {
cout << num << " is odd." << endl;
}
return 0;
}
Program 4: Loops (for loop)
Objective: Illustrate the use of loops.
Example:
#include <iostream>
using namespace std;
int main() {
for (int i = 1; i <= 5; ++i) {
cout << "Iteration " << i << endl;
}
return 0;
}
Program 5: Functions
Objective: Define and call functions.
Example:
#include <iostream>
using namespace std;
// Function prototype
void greet() {
cout << "Hello, welcome to C++ programming!" << endl;
}
int main() {
// Function call
greet();
return 0;
}
2
Mechanical Engineering Department, University of Wah, Wah Cantt
Program 6: Arrays
Objective: Introduce array declaration and manipulation.
Example:
#include <iostream>
using namespace std;
int main() {
int numbers[5] = {1, 2, 3, 4, 5};
return 0;
}
Conclusion:
In conclusion, engaging in diverse C++ programming exercises is instrumental in honing
programming skills and mastering the language. Through consistent practice, developers can
cultivate a deeper understanding of C++ syntax, data structures, and algorithms. This hands-on
approach fosters problem-solving abilities and enhances creativity in coding. Additionally,
exposure to various programming challenges enables individuals to tackle real-world problems
with confidence. Ultimately, the iterative process of writing, debugging, and optimizing code
not only solidifies C++ proficiency but also instills a versatile mindset crucial for success in
software development. So, commit to regular practice, embrace challenges, and enjoy the
continuous growth and enrichment that come with mastering C++ programming.
THE END
3
Mechanical Engineering Department, University of Wah, Wah Cantt