Kid's Poetries

The Elephant
Author Unknown


The elephant walks,
like this and like that.


He's very tall,
and he's very fat.


He has no fingers,
but he does have toes,
And goodness gracious,
What a nose!






The Secret
Author Unknown


We have a secret, just we there,
The robin and I, and the sweet cherry tree, --
The bird told the tree, and the tree told me,
And nobody knows it but just we three.


But of course, the robin knows best,
Because he built the -- I shan't tell the rest;
And laid the four little -- something in it--
I'm afraid I shall tell it every minute.


But if the tree and the robin don't peep,
I'll try my best the secret to keep;
Though I know when the little birds fly about,
Then the whole secret will be out.






Boats Sail On The Rivers
Christina Rossetti


Boats sail on the rivers,
And ships sail on the seas;
But clouds that sail across the sky,
Are prettier far than these.


There are bridges on the rivers,
As pretty as you please;
But the bow that bridges heaven,
And overtops the trees,
And builds a road from earth to sky,
Is prettier far than these.








Indian Children
Annette Wynne




Where we walk to school each day,
Indian children used to play--
All about our native land,
Where the shops and houses stand.


And the trees were very tall,
And there no streets at all,
Not a church and not a steeple--
Only woods and Indian people.


Only wigwams on the ground,
And at night bears prowling round --
What a different place today,
Where we live and work and play!






In The Heart of A Seed
Kate Brown


In the heart of a seed,
Buried deep, so deep,
A dear little plant,
Lay fast asleep.


"Wake,"said the sunshine,
"And creep to the light."
"Wake,"said the voice 
Of the raindrops bright.


The little plant heard;
And it rose to see
What the wonderful
Outside world might be.






God Gave Me Eyes
Olive Burt


God gave me eyes
That I might see
The wonder of a blossoming tree;
My dolly's face,
My story book,
and how the various creatures look.


God gave me ears
That I might hear
The laugh of brooklets ringing clear,
My kitten's purr,
A violin,
And Mother when she calls me in.


God gave me a tongue
That I might know
The flavor of all fruits that grow,
The taste of honey
From the bee,
And good things Mother cooks for me.


I thank you, God,
For making me
So that I hear and feel and see;
And since these good things
Come from you,
I'll use them as You want me to.






The Wonderful World
William B. Rands


"Great, wide, beautiful, wonderful world.
With the wonderful water around you curled.
and the wonderful grass upon your breast,--
World, you are beautifully dressed.


"the wonderful air is over me,
And the wonderful wind is shaking the tree,--
It walks on the water, and whirls the mills,
And talks to itself on the top of the hills.


"You friendly Earth! how far do you go
With the wheat-fields that nod and the rivers that flow,
With cities and gardens, and cliffs, and isles,
And people upon you for thousands of miles?"






the Brown Thrush
Lucy Larcom


There's a merry brown thrush sitting up in the tree.
"He's singing to me! He's singing to me!"
And what does he say, little girl, little boy!
"Oh, the world's running over with joy!
Don't you hear? don't you see?
Hush! Look! In my tree,
I'm as happy as happy can be!"


And the brown thrush keeps singing, "A nest do you see,
And five eggs, hid by me in the juniper tree?"
Don't meddle!Don't touch, little girl, little boy,
Or the world will lose some of its joy!
Now I'm glad! Now I'm free!
And I always shall be,
If you never bring sorrow to me."
首先,我们需要创建一个Poetry类来存储诗词信息,包括id、题名、作者姓名和全文: ```java public class Poetry { private int id; private String title; private String author; private String content; public Poetry(int id, String title, String author, String content) { this.id = id; this.title = title; this.author = author; this.content = content; } public int getId() { return id; } public String getTitle() { return title; } public String getAuthor() { return author; } public String getContent() { return content; } } ``` 接下来,我们需要创建一个PoetryDatabase类来管理诗词数据表,包括添加、查询、修改、删除等操作: ```java public class PoetryDatabase { private static final String PREF_NAME = "poetry_database"; private static final String KEY_NEXT_ID = "next_id"; private SharedPreferences preferences; private int nextId; public PoetryDatabase(Context context) { preferences = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); nextId = preferences.getInt(KEY_NEXT_ID, 1); } public List<Poetry> getAllPoetries() { List<Poetry> poetries = new ArrayList<>(); Map<String, ?> allEntries = preferences.getAll(); for (Map.Entry<String, ?> entry : allEntries.entrySet()) { String key = entry.getKey(); if (key.startsWith("poetry_")) { String[] parts = key.split("_"); int id = Integer.parseInt(parts[1]); String[] values = ((String) entry.getValue()).split(","); String title = values[0]; String author = values[1]; String content = values[2]; Poetry poetry = new Poetry(id, title, author, content); poetries.add(poetry); } } return poetries; } public Poetry getPoetryById(int id) { String key = "poetry_" + id; String value = preferences.getString(key, null); if (value != null) { String[] values = value.split(","); String title = values[0]; String author = values[1]; String content = values[2]; return new Poetry(id, title, author, content); } else { return null; } } public void addPoetry(Poetry poetry) { String key = "poetry_" + poetry.getId(); String value = poetry.getTitle() + "," + poetry.getAuthor() + "," + poetry.getContent(); preferences.edit().putString(key, value).apply(); nextId++; preferences.edit().putInt(KEY_NEXT_ID, nextId).apply(); } public void updatePoetry(Poetry poetry) { String key = "poetry_" + poetry.getId(); String value = poetry.getTitle() + "," + poetry.getAuthor() + "," + poetry.getContent(); preferences.edit().putString(key, value).apply(); } public void deletePoetry(Poetry poetry) { String key = "poetry_" + poetry.getId(); preferences.edit().remove(key).apply(); } } ``` 在PoetryDatabase中,我们使用SharedPreferences来存储诗词数据表,并提供了一些操作,如getAllPoetries、getPoetryById、addPoetry、updatePoetry和deletePoetry等。 具体使用方法如下: ```java // 创建PoetryDatabase对象 PoetryDatabase db = new PoetryDatabase(context); // 添加一首诗词 Poetry poetry = new Poetry(1, "静夜思", "李白", "床前明月光,疑是地上霜。举头望明月,低头思故乡。"); db.addPoetry(poetry); // 查询所有诗词 List<Poetry> allPoetries = db.getAllPoetries(); // 查询指定id的诗词 Poetry poetry = db.getPoetryById(1); // 修改诗词 poetry.setTitle("将进酒"); db.updatePoetry(poetry); // 删除诗词 db.deletePoetry(poetry); ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值