The document discusses various Java collection classes including LinkedList, ArrayList, Sets, Maps, and inner classes. It provides examples of how to use HashSet, HashMap, and inner classes. It notes that LinkedList was designed to make add/remove faster than ArrayList. It also summarizes that Sets cannot contain duplicate elements unlike Lists, and Maps store objects in key-value pairs. Finally, it demonstrates using an inner class as an event listener and the advantages of inner classes for code cohesion and convenience.
Installing and Using Python
Basic I/O
Variables and Expressions
Conditional Code
Functions
Loops and Iteration
Python Data Structures
Errors and Exceptions
Object Oriented with Python
Multithreaded Programming with Python
Install/Create and Using Python Library
Compile Python Script
Resources
===========================
and 7 Quizzes
This talk was give for Elixir Montreal Meetup to talk about how the elixir formatter works and how it compiles the source code to generate a pretty format
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 3 of 5 b...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
NOTEPAD MAKING IN PAYTHON BY ROHIT MALAVRohit malav
We will stick to the basic functionalities expected of a simple text editor – which includes the ability to – write something on the notepad, save it and open and modify it whenever required. For the purpose of this tutorial we will design the GUI in Tkinter.
Additionally we will use another standard python module called ScrolledText because the text widget module of Tkinter does not support scrolling functionality.
Installing and Using Python
Basic I/O
Variables and Expressions
Conditional Code
Functions
Loops and Iteration
Python Data Structures
Errors and Exceptions
Object Oriented with Python
Multithreaded Programming with Python
Install/Create and Using Python Library
Compile Python Script
Resources
===========================
and 7 Quizzes
This talk was give for Elixir Montreal Meetup to talk about how the elixir formatter works and how it compiles the source code to generate a pretty format
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 3 of 5 b...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
NOTEPAD MAKING IN PAYTHON BY ROHIT MALAVRohit malav
We will stick to the basic functionalities expected of a simple text editor – which includes the ability to – write something on the notepad, save it and open and modify it whenever required. For the purpose of this tutorial we will design the GUI in Tkinter.
Additionally we will use another standard python module called ScrolledText because the text widget module of Tkinter does not support scrolling functionality.
I only need help with four methods in the EmployeeManager class the .pdfarpitcomputronics
I only need help with four methods in the EmployeeManager class the methods are addRequest,
viewNextRequest, grantNextRequest, and outputRequests. I posted all of the other uml for
refernce on items that could be called.
UML DIAGRAM FOR AND DISCUSSION FOR EmptyListException
EmptyListException extends RuntimeException
<>EmptyListException( )
<>EmptyListException(name : String)
Constructors
The constructor that takes a String as an argument calls upon the super class constructor with that
String concatenated with “ is Empty”. The constructor that takes no argument calls upon the
other constructor with the argument of “List”.
This class should belong to the exceptions package.
UML DIAGRAM FOR AND DISCUSSION FOR ListNode
ListNode>
data : E
nextNode: ListNode
<>ListNode(d : E)
<>ListNode(d : E, node : ListNode)
+ setData(d : E)
+getData() : E
+setNext(next : ListNode)
+getNext() : ListNode
Notes on ListNode
ListNode(d : E) sets the nextNode to null, the rest of the implementation of the ListNode class is
self-explanatory as discussed in class
UML DIAGRAM FOR AND DISCUSSION FOR LinkedList
LinkedList>
firstNode : ListNode
lastNode : ListNode
numElements : int
name : String
<>LinkedList()
<>LinkedList(name : String)
+ insertAtFront(item : E)
+ insertAtBack(item : E)
+ removeFromFront() : E throws EmptyListException
+ removeFromBack() : E throws EmptyListException
+ removeItem(index : int) : E throws IndexOutOfBoundsException
+ getItem(index : int) : E throws IndexOutOfBoundsException
+ setItem(index : int, item : E) throws IndexOutOfBoundsException
+ findAndRemove(item : E) : Boolean
+ findItem(item E) : int
+ lengthIs() : int
+ clear()
+ toString()
+ isEmpty() : Boolean
+ sort() throws EmptyListException
Notes on LinkedList
Constructors
Both constructors set firstNode and lastNode to null and numElements to 0. The constructor that
takes a String sets the name data member to the String that is passed
insertAtFront(E)
Inserts the passed item to the front of the list
void insertAtBack(E)
Inserts the passed item in the back of the list
void removeFromFront()
Removes the first item in the list, and returns it. If the list is empty throws a new
EmptyListException with the message: “(Name of list) is Empty”
removeFromBack()
Removes the last item in the list, and returns it. If the list is empty throws a new
EmptyListException with the message: “(Name of list) is Empty”
removeItem(int)
Removes the element from the list at the given index. If that index does not exist within the
LinkedList an IndexOutOfBoundsException is thrown with the message: “(Name of List) Index
out of Range”. Returns the item removed.
getItem(int)
Returns the element at the given index. If that index does not exist within the LinkedList an
IndexOutOfBoundsException is thrown with the message: “(Name of List) Index out of Range”.
public setItem(int index, E item)
Attempts to place the passed item into the given index. If that index does not exist within the
LinkedList an IndexOutOfBound.
I need help with this code working Create another project and add yo.pdffantoosh1
I need help with this code working Create another project and add your jar file in this project. In
the main method of App class of this second project test your MyArrayList class. It is mandatory
to follow the instructions to get full credit. You need to perform the following actions. 1. Create
five strings, A1",,'B2",,'C3",'D4",'E5" 2. Save these Strings in your MyArrayList 3. Print a
message "Displaying List" 4. Display the list 5. Insert another String in your MyArrayList at
location 2 6. Print a message "Inserting Item" 7. Display the list 8. Remove String at location 0 9.
Print a message "Removing Item" 10. Display the list 11. Print a message "Setting a String" 12.
Set a new String in location 1 13. Display the list 14. Check whether "D4" is present in the list or
not, print an appropriate message 15. Find the index of "E5" in your list, print an appropriate
message 16. Print a message "Emptying List" 17. Empty the list 18. Print the size of the list
These steps check most of your MyArrayList functionality. I will also perform my own checks of
your code while grading. Deliverable: a. Copy the utils.jar file in your project folder. b. Make a
zip file of full project, not the src folder only or java files only. c. Submit the zip file. Grading
Rubric: The project is not submitted as required: 0 points
st.java J MyArrayList.java 2 J App.java 2 J MyFile.java 2 rc >J MyArrayList.java >q&
MyArrayList > get(int) public class MyArrayList implements MyList \{ Object [] obj = new
Object [1]; int size; public int size()\{ return size; \} public object get(int index) if (index <0
index >= size ){// throw new indexo return obj [index]; \} return index; // this should be deleted
after public void add (Object 0 ) \{ //if this test fails there is a space in the array. // it will pass
itself. if ( size == obj. length ){ Object [] obj2 = new 0 bject [obj. length 2]; for(int i=0;i<0bj.
length; i++){ obj2[i]=obj [i] ; \} obj=obj2; \} obj [ size ]=0; size++; \} public void add(int index,
Object o) \{ if(index > size || index <0 ) \{ throw new IndexOut0fBoundsException(index); \} if
(size == obj. length ){ Object [] obj2 = new Object [obj. length 2 ]; for(int i=0;i<0bj. length;
i++){ obj 2[i]=obj[i]; \} obj=obj2; \} if (index i=size;i>= index; i){ nhi [i=nhii1 : Ln 16, Col 56
Spaces: 4 UTF-8 LF \{\} Java
In this lab you will add an interface to the MyUtils project, and implement it in your
MyArrayList class in the MyUtils project. You will test the newly added functionality of your
MyArrayList class in another project. The UML for the Interface is as follows S Description of
methods Following method are self-explanatory: size(), get(int index), add (object o), remove
(int index), and isEmpty). Below is the description of all other methods. void add(int index,
Object o) inserts the given reference of object o at location index, making all entries move down
a spot. void remove (Object o) removes the first occurrence of object o in the list, moving all
entries .
Why following sort does not work (It does not sort last 2 - 3 numbe.pdfgopalk44
Why following sort does not work? (It does not sort last 2 - 3 numbers)
//Sort order
class SortNumbListener implements ActionListener
{
@Override
public void actionPerformed(ActionEvent e)
{
Collections.sort(list);
for(int i = 0; i < list.size(); i++)
{
textfield2.setText(list.toString());
}
System.out.print(list + \"\ \");
}
}
Solution
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.swing.JTextField;
public class SorAction {
public JTextField textfield2;
public List list;
public SorAction() {
// TODO Auto-generated constructor stub
textfield2 = new JTextField();
list = new ArrayList();
list.add(20);
list.add(12);
list.add(32);
list.add(3);
new SortNumbListener().actionPerformed(new ActionEvent(\"\", 0, null));
}
public static void main(String[] args) {
try {
new SorAction();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
}
class SortNumbListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
Collections.sort(list);
textfield2.setText(list.toString());
System.out.print(list + \"\ \");
}
}
}
OUTPUT:
[3, 12, 20, 32]
NOTE: please check the above example, sorting fine, but what is the need of loop,
if you want to add the text to textbox use setText() method of textfield.
Labprogram.java
LinkedList.java
import java.util.NoSuchElementException;
public class LinkedList {
private class Node {
private T data;
private Node next;
private Node prev;
public Node(T data) {
this.data = data;
this.next = null;
this.prev = null;
}
}
private int length;
private Node first;
private Node last;
private Node iterator;
/**** CONSTRUCTORS ****/
public LinkedList() {
first = null;
last = null;
iterator = null;
length = 0;
}
/**
* Converts the given array into a LinkedList
*
* @param array the array of values to insert into this LinkedList
* @postcondition
*/
public LinkedList(T[] array) {
}
/**
* Instantiates a new LinkedList by copying another List
*
* @param original the LinkedList to copy
* @postcondition a new List object, which is an identical,
* but separate, copy of the LinkedList original
*/
public LinkedList(LinkedList original) {
}
public T getFirst() throws NoSuchElementException {
if (isEmpty()) {
throw new NoSuchElementException("The list is empty");
}
return first.data;
}
public T getLast() throws NoSuchElementException {
if (isEmpty()) {
throw new NoSuchElementException("The list is empty");
}
return last.data;
}
public T getIterator() throws NullPointerException {
if (iterator != null) {
return iterator.data;
} else {
throw new NullPointerException("Iterator is off the end opf the list.");
}
}
public int getLength() {
return length;
}
public boolean isEmpty() {
return length == 0;
}
public boolean offEnd() {
return iterator == null;
}
public void addFirst(T data) {
Node newNode = new Node(data);
if (isEmpty()) {
first = newNode;
last = newNode;
} else {
newNode.next = first;
first.prev = newNode;
first = newNode;
}
length++;
}
public void addLast(T data) {
Node newNode = new Node(data);
if (isEmpty()) {
first = newNode;
last = newNode;
} else {
last.next = newNode;
newNode.prev = last;
last = newNode;
}
length++;
}
public void addIterator(T data) throws NullPointerException {
if (offEnd()) {
throw new NullPointerException("addIterator Iterator is off end.");
}
if (iterator == last) {
addLast(data);
} else {
Node newNode = new Node(data);
Node next = iterator.next;
newNode.next = next;
newNode.prev = iterator;
iterator.next = newNode;
next.prev = newNode;
length++;
}
}
public void removeFirst() throws NoSuchElementException {
if (isEmpty()) {
throw new NoSuchElementException("The list is empty");
}
if (length == 1) {
first = null;
last = null;
iterator = null;
} else {
if (iterator == first) {
iterator = null;
}
first = first.next;
first.prev = null;
}
length--;
}
public void removeLast() throws NoSuchElementException {
if (isEmpty()) {
throw new NoSuchElementException("The list is empty");
}
if (length == 1) {
first = null;
last = null;
iterator = null;
} else {
if (iterator == last) {
iterator = null;
}
last = last.prev;
last.next = null;
}
length--;
}
public void removeIterator() throws NullPointerException {
if (offEnd()) {
throw new NullPointerException("Iterator is off the end opf the list.");
}
if (iterator .
3. Section 3 Complete functionality on listing screen (1.5 marks)
a. The starting code includes the definition of a JButton named cmdSortAge, but it is not
shown on the PersonListing screen. Modify the PersonListingScreen to allow it to be shown
b. Add a listener which implements the functionality to sort the list in ascending order of age.
Hints:
i. You should already know how to sort data
ii. Presenting information in a specific order in the table may involve removing all the data
and then re-adding it iii. Data in the table is removed with the command
model.setRowCount(0);- model is an object name that was declared with the starting code. Ie.
model is an object of the class DefaultTableModel.
c. Add a button and an associated listener to sort the list in order of first name .
starter code
public abstract class BasePerson {
protected String name;
private boolean publish;
private int age;
private int id;
public BasePerson(String name,int age, boolean pub)
{
this.name =name;
this.age=age;
publish = pub;
}
public int getAge()
{
return age;
}
public abstract String getName();
protected void setId(int id)
{
this.id = id;
}
public int getId()
{
return id;
}
public boolean getPublish()
{
return publish;
}
}
public class Person extends BasePerson implements Comparable
{
private static int nextId=0;
public Person(String name, int age, boolean willPublish)
{
super(name, age, willPublish);
super.setId(nextId);
nextId++;
}
public String getName()
{
return name;
}
public static String getPHeader()
{
String returnval = "ID\tName\tAge\tWillPublish";
returnval+="\n---------------------------------";
return returnval;
}
public String toString()
{
return(getId()+"\t"+getName()+"\t"+getAge()+"\t"+getPublish());
}
public static void resetId()
{
nextId=0;
}
public int compareTo(Person other)
{
return other.getId() - this.getId();
}
}
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class PersonEntry extends JFrame
{
private JTextField txtName; //name
private JTextField txtAge; //age
private JButton cmdSave;
private JButton cmdClose;
private JButton cmdClearAll;
private JPanel pnlCommand;
private JPanel pnlDisplay;
public PersonEntry()
{
setTitle("Entering new person");
pnlCommand = new JPanel();
pnlDisplay = new JPanel();
pnlDisplay.add(new JLabel("Name:"));
txtName = new JTextField(20);
pnlDisplay.add(txtName);
pnlDisplay.add(new JLabel("Age:"));
txtAge = new JTextField(3);
pnlDisplay.add(txtAge);
pnlDisplay.setLayout(new GridLayout(2,4));
cmdSave = new JButton("Save");
cmdClose = new JButton("Close");
pnlCommand.add(cmdSave);
pnlCommand.add(cmdClose);
add(pnlDisplay, BorderLayout.CENTER);
add(pnlCommand, BorderLayout.SOUTH);
pack();
setVisible(true);
}
}
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
.
I am sorry but my major does not cover programming in depth (ICT) an.pdfseamusschwaabl99557
I am sorry but my major does not cover programming in depth (ICT) and we are expected to
know advanced java programming. I am looking for help. I have purchased a book from Oracle
but I will not be up to speed this semester. Please Help me!!!
1. Write an app called viewer that will have a Label at the top saying \"My Viewer\" (or
something like that)
2. Will have JButtons at the bottom that will do Next, Previous, and Quit
3. Have the whole middle be a JLabel in which you will display Images stored in a directory.
4. The directory can be named Resource.
5. When you run the program (java viewer) it will read all the names in the Resource Directory.
Then, when you click Next or Previous it will display an Image.
6. Note: you will need to find a java method that exists for reading a whole directory of
filenames. You can store all those names in a String Array when run the program.
7. You will use a counter or index that is an int an when you click Next it will increment the
counter until it reach some maximum value and then you will set it to 0. Previous will decrement
the counter until it goes negative and then it will set the counter to the Maximum index ( which
is how many filenames you have in the Image names array)
8. Submit the program viewer.java I should be able to use it with my own Resource directory
Solution
Compilation process
javac Viewer.java
Run
java Viewer
Click on next or previous a file chooser will be opened and you can select your file
The Code is in four file.
// File Dg.java
import java.io.File;
public class Dg {
public File nextFile(File file) {
File f[] = new File[5000];
f = file.getParentFile().listFiles(new ImageFileFilter());
int max = f.length;
max = max - 1;
// System.out.println(file);
for (int i = 0; i < f.length; i++) {
if (f[i].equals(file)) {
if (i + 1 > max) {
return f[0];
} else {
return f[i + 1];
}
} else {
// System.out.println(0);
// return file;
}
}
return file;
}
public File priFile(File file) {
File f[] = new File[5000];
f = file.getParentFile().listFiles(new ImageFileFilter());
int min = 0;
// System.out.println(file);
for (int i = 0; i < f.length; i++) {
if (f[i].equals(file)) {
min = i - 1;
if (min < 0) {
return f[f.length-1];
} else {
return f[min];
}
} else {
// System.out.println(0);
// return file;
}
}
return file;
}
}
/// Image.java
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JPanel;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
public class Image extends JPanel {
/**
*
*/
private static final long serialVersionUID = 1L;
public BufferedImage img = null;
/**
* Create the panel.
*/
@SuppressWarnings(\"static-access\")
public Image() {
setBackground(new Color(255, 255, 255));
setLayout(null);
try {
Viewer ocr = new Viewer();
img = ImageIO.read(ocr.file);
JLabel lblNewLabel = new JLabel(Viewer.f.
OrderTest.javapublic class OrderTest { Get an arra.pdfakkhan101
OrderTest.java
public class OrderTest {
/**
* Get an array of specified size and pass it to Order.order().
* Report the results.
*/
public static void main(String[] args) {
if (args.length != 1) {//1
System.out.println(\"Usage: java OrderTest sizeOfArray\ \"
+ \"\\tor\ \\tjava OrderTest arrayFile\");
System.exit(1);
}
// create or read the int[]
int size = 0;
int[] array = new int[0];//5
try {
size = Integer.parseInt(args[0]);
array = ArrayOfInts.randomizedArray(size);
} catch (NumberFormatException nfe) {//8
try {
array = ArrayOfInts.arrayFromFile(args[0]);
size = array.length;
} catch (Exception e) {
System.err.println(\"unable to read array from \" + args[0]);
System.exit(1);//14
}
}
System.out.println(\"before:\");//15
for (int i = 0; i < array.length; i++) {//2 n
System.out.printf(((i+1) % 10 > 0) ? \" %d\" : \" %d\ \", array[i]);//1
}
int myNum = Order.order(array); //this is the call we want to measure
System.out.println(\"\ after:\");//18
for (int i = 0; i < array.length; i++) {//2 n
System.out.printf(((i+1) % 10 > 0) ? \" %d\" : \" %d\ \", array[i]);
}
System.out.println(myNum);
}
}
ArrayOfInts.java
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.InputMismatchException;
import java.util.Scanner;
public class ArrayOfInts {
/**
* Returns an array of consecutive ints from 1 to size.
*/
public static int[] orderedArray(int size) {
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = i+1;
}
return a;
}
/**
* Returns a randomized array containing ints from 1 to size.
*/
public static int[] randomizedArray(int size) {
ArrayList aL = new ArrayList();
for (int i = 0; i < size; i++) {
aL.add(i+1);
}
Collections.shuffle(aL);
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = aL.get(i);
}
return a;
}
/**
* Writes an int[] to a plain-text file with ints separated by spaces.
* Useful for creating input files for repeatable tests.
*/
public static void arrayToFile(int[] array, String outfile) {
try {
FileWriter fw = new FileWriter(outfile);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter outFile = new PrintWriter(bw);
for (int i : array) {
outFile.print(i + \" \");
}
outFile.close();
} catch (IOException e) {
System.err.println(\"Could not write to \" + outfile + \"\ \" + e);
}
}
/**
* Read ints from a file and return them in an int[]
*/
public static int[] arrayFromFile(String infile) throws FileNotFoundException,
InputMismatchException {
Scanner scan = new Scanner(new File(infile));
ArrayList aL = new ArrayList();
while (scan.hasNext()) {
aL.add(scan.nextInt());
}
scan.close();
int[] a = new int[aL.size()];
for (int i = 0; i < a.length; i++) {
a[i] = aL.get(i);
}
return a;
}
}
Order.java
public class Order {
/**
* Take an int[] and reorganize it so they are in ascending order.
*/
public static int order(int[] array) .
2.(Sorted list array implementation)This sorted list ADT discussed .pdfarshin9
2.(Sorted list: array implementation)This sorted list ADT discussed in class should be extended
by the addition of two new methods:
//Interface: ArrayListADT
//works for int
public interface ArrayListADT {
public boolean isEmpty(); //Method to determine whether the list is empty.
public boolean isFull(); //Method to determine whether the list is full.
public int listSize(); //Method to return the number of elements in the list.
public int maxListSize(); //Method to return the maximum size of the list.
public void print(); //Method to output the elements of the list.
public boolean isItemAtEqual(int location, int item); //Method to determine whether item is
the same as the item in the list at location.
public void insertAt(int location, int insertItem); //Method to insert insertItem in the list at
the position
public void insertEnd(int insertItem); //Method to insert insertItem at the end of the list.
public void removeAt(int location); //Method to remove the item from the list at location.
public int retrieveAt(int location); //Method to retrieve the element from the list at location.
public void replaceAt(int location, int repItem); //Method to replace the element in the list at
location with repItem.
public void clearList(); //Method to remove all the elements from the list.
public int search(int searchItem); //Method to determine whether searchItem is in the list.
public void remove(int removeItem); //Method to remove an item from the list.
}
//Class: ArrayListClass implements
//Interface: ArrayListADT
public abstract class ArrayListClass implements ArrayListADT {
protected int length; //to store the length of the list
protected int maxSize; //to store the maximum size of the list
protected int[] list; //array to hold the list elements
//Default constructor
public ArrayListClass() {
maxSize = 100;
length = 0;
list = new int[maxSize];
}
//Alternate Constructor
public ArrayListClass(int size) {
if(size <= 0) {
System.err.println(\"The array size must be positive. Creating an array of size 100.\");
maxSize = 100;
}
else
maxSize = size;
length = 0;
list = new int[maxSize];
}
public boolean isEmpty() {
return (length == 0);
}
public boolean isFull() {
return (length == maxSize);
}
public int listSize() {
return length;
}
public int maxListSize() {
return maxSize;
}
public void print() {
for (int i = 0; i < length; i++)
System.out.print(list[i] + \" \");
System.out.println();
}
public boolean isItemAtEqual(int location, int item) {
if (location < 0 || location >= length) {
System.err.println(\"The location of the item to be compared is out of range.\");
return false;
}
return list[location]== item;
}
public void clearList() {
for (int i = 0; i < length; i++)
list[i] = 0;
length = 0;
System.gc(); //invoke the Java garbage collector
}
public void removeAt(int location) {
if (location < 0 || location >= length)
System.err.println(\"The location of the item to be removed is out of range.\");
else {
for(int i = location; i < length - 1; i++)
list[i] .
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
1. Lecture 8
More on collections
Object Oriented Programming
Eastern University, Dhaka
Md. Raihan Kibria
2. LinkedList
LinkedList is just like ArrayList; however, it
was designed to make add/remove faster
and efficient
Has these methods:
addFirst
AddLast
removeFirst
removeLast
4. Sets
Examples are HashSet, TreeSet
Difference between Set and List
A list can have duplicate objects
Set cannot have duplicate objects
See example in the next slide
5. Output
size of set: 4
0
1
2
3
size of list: 5
0
1
2
3
3
We can see set did not add duplicate element
6. public class SetDemo {
public static void main(String[] args) {
Set<Integer>set = new HashSet<Integer>();
List<Integer>list = new ArrayList<Integer>();
for (int i=0; i<4; i++){
set.add(new Integer(i));
list.add(new Integer(i));
}
set.add(3);
list.add(3);
System.out.println("size of set: " + set.size());
for (int i=0; i<set.size(); i++)
System.out.println(set.toArray()[i]);
System.out.println("size of list: " + list.size());
for (int i=0; i<list.size(); i++)
System.out.println(list.get(i));
}
}
Output in the following slide
7. Map interface
Object to a map are key,value pairs
For example,
<dhaka, 02>
<chittagong, 031>
<sylhet, 032>
Two most common map implementations
are HashMap and TreeMap
8. HashMap example
public class MapDemo {
public static void main(String[] args) {
Map<String, Integer>map = new HashMap<String, Integer>();
map.put("Dhaka", 2);
map.put("Chittagong", 31);
map.put("Sylhet", 32);
System.out.println(map.get("Chittagong"));
System.out.println(map.get("Comilla"));
}
}
Output is:
31
null