Драйвер стандартних пристроїв введення-виведення. Курсовая работа (т). Информационное обеспечение, программирование.
💣 👉🏻👉🏻👉🏻 ВСЯ ИНФОРМАЦИЯ ДОСТУПНА ЗДЕСЬ ЖМИТЕ 👈🏻👈🏻👈🏻
Информационное обеспечение, программирование
Вы можете узнать стоимость помощи в написании студенческой работы.
Помощь в написании работы, которую точно примут!
Похожие работы на - Драйвер стандартних пристроїв введення-виведення
Нужна качественная работа без плагиата?
Не нашел материал для своей работы?
Поможем написать качественную работу Без плагиата!
Драйвер стандартних пристроїв введення-виведення
мобільний інтерфейс
програмний драйвер
Ціллю курсової роботи є
створення мобільного додатку зі зручним та простим у використанні інтерфейсом,
який би міг редагувати та використовувати XML -файли та за даними
з файлу відтворювати інформацію. Також редактор повинен використовувати карти і
використовувати GPS модуль.
Практичне застосування
даного програмного проекту можливе в сфері послуг.
За даними з карти ми
відмічаємо об’єкт (магазін) де ми присваємо значення координат з GPS модуля і добавляємо
назву. Далі нам потрібно зробити аудинтифікацію користувача (логін і пароль)
щоб кожний користувач зміг скласти свій список покупок.
Програма має містити
наступну функціональність:
· Можливість
завантаження / збереження даних у в форматі XML
· Синтаксичний
розбір і верифікація формату XML з відбудовою внутрішньої моделі даних, в разі помилок -
формування виключення (Exception)
· Інтерфейс
користувача (на основі компонентів бібліотеки Android), який містить
такі області:
o Список покупок і його редагування
· Можливість
збереження списку.
· Мова
програмування Java з використанням бібліотеки Android
· Інтерфейс
користувача має забезпечувати доступ до всієї функціональності програми;
2. Проектування
інтерфейсу користувача
Розробити таку програму,
яка дозволить спростити похід в магазин як для однієї людини, так і для всієї
родини
.2 Модель
інтерфейсу користувача
Головне вікно програми
використовується для аудинтифікації і взаємодії користувача з програмою
Початковий опис
прецеденту інтерфейсу користувача:
) Прецедент
починається коли користувач запускає програму.
) Користувач може
виконати одну з наступних дій:
· Добавить
і видалить покупку.
· Добавить
і видалити магазін.
· Дізнатися
по якій саме адресі знаходить даний обєкт.
· Змінити
графічне положення обєкта.
· Побачіти
на карті де знаходиться даний обєкт.
) Прецедент
закінчується коли користувач закінчує роботу з програмою.
2.3 Приклад зовнішнього
вигляду програми
Account
Purchase
Shop
User
+
Purchase
Purchase
Shop
User
import android.view. View. OnClickListener;
public class AddPurchaseDialor extends Dialog implements
OnClickListener {okButton;cancelButton;
public AddPurchaseDialor (Context context) {
super (context);(R.layout. add_purches_dialog );= (Button)
findViewById (R.id. ok );.setOnClickListener( this );= (Button)
findViewById (R.id. cancel );.setOnClickListener( this );
{textView = (TextView)
findViewById (R.id. entry );.getText();();
import android.view. View. OnClickListener;
public class seting extends Activity {
public void onCreate (Bundle savedValues) {
super .onCreate(savedValues);(R.layout. seting );
// Capture our button
from layoutbutton = (Button) findViewById (R.id. addContactButton1 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubintent_pokypki = new Intent (seting. this ,
pokypki. class );(intent_pokypki);
// Capture our button
from layoutbutton1 = (Button) findViewById (R.id. addContactButton2 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
public void onClick (View v) {intent_magazin = new Intent
(seting. this , magazin. class );
import android.graphics.drawable. Drawable;
import android.location. LocationListener;
import android.location. LocationManager;
import com.google.android.maps. GeoPoint;
import com.google.android.maps. ItemizedOverlay ;
import com.google.android.maps. MapActivity;
import com.google.android.maps. MapController;
import com.google.android.maps. MapView;
import com.google.android.maps. Overlay;
import com.google.android.maps. OverlayItem;
public class ShopsMap extends MapActivity {
private LocationListener locationListener;
protected boolean isRouteDisplayed() {
public void onCreate (Bundle savedInstanceState) {
super .onCreate(savedInstanceState);(R.layout. maps );
// - use the
LocationManager class to obtain GPS locations-= (LocationManager)(Context. LOCATION_SERVICE );
.requestLocationUpdates
(. GPS_PROVIDER ,
= (MapView) findViewById
(R.id. mapview );.setBuiltInZoomControls( true );=
mapView.getController();
drawable = this .getResources().getDrawable
(R.drawable. androidmarker );itemizedoverlay = new
ShopsOverlays(drawable);overlay = new TouchOverlay (mapView,
itemizedoverlay);.getOverlays().add(overlay);
//mapOverlays.add( itemizedoverlay );
private class MyLocationListener implements
LocationListener
public void onLocationChanged (Location loc) {
if (loc!= null ) {. makeText (getBaseContext(),
«Location changed: Lat:»
+ loc.getLatitude() +
«Lng:» +
loc.getLongitude(),. LENGTH_SHORT ).show();
( int )
(loc.getLongitude() * 1E6));.animateTo(p);.setZoom(25);.invalidate();
public void onProviderDisabled (String provider) {
public void onProviderEnabled (String provider) {
public void onStatusChanged (String provider, int
status,extras) {
private class TouchOverlay extends com.google.android.maps.
Overlay {
private ArrayList mOverlays = new
ArrayList();
public TouchOverlay (MapView mv, ShopsOverlays so) {
public boolean onTouchEvent (MotionEvent event, MapView mapView)
if (event.getAction() == 1) {p = mapView.getProjection().fromPixels(
( int )
event.getY());. makeText (getBaseContext(),.getLatitudeE6 () / 1E6 +»,»
+.getLongitudeE6 () /1E6,. LENGTH_SHORT ).show();.getController().animateTo(p);.getController().setZoom(15);
//OverlayItem overlayitem
= new OverlayItem (p, « Магазин », «»);
//so.addOverlay( overlayitem );shopDialog
= new AddShopDialog (mapView.getContext());.show();
private class ShopsOverlays extends com.google.android.maps.
ItemizedOverlay {
private ArrayList mOverlays = new
ArrayList();
public ShopsOverlays (Drawable defaultMarker) {
super ( boundCenterBottom (defaultMarker));
public void addOverlay (OverlayItem overlay)
{.add(overlay);();
protected OverlayItem createItem ( int i) {
protected boolean onTap ( int index) {item =
mOverlays.get(index);. Builder dialog = new AlertDialog.
Builder(mContext);.setTitle (item.getTitle());.setMessage (item.getSnippet());.show();
public ShopsOverlays (Drawable defaultMarker, Context context) {
import android.view. View. OnClickListener;
public class pokypki extends Activity {
// Intent
intent_pokypki = new Intent (this, pokypki.class);
public void onCreate (Bundle savedValues) {
super .onCreate(savedValues);(R.layout. pokypki );
if ( flag == true ) {intent_seting = new Intent
(pokypki. this , seting. class );(intent_seting);
final Button buttonMain = (Button) findViewById (R.id. addContactButton );.setOnClickListener
( new OnClickListener() {
public void onClick (View v) {dialog = new
AddPurchaseDialor (pokypki. this );.setTitle («Add new purchase»);.show();
// Capture our button
from layoutbutton = (Button) findViewById (R.id. addContactButton3 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubintent_seting = new Intent (pokypki. this ,
seting. class );(intent_seting);
// Capture our button
from layoutbutton2 = (Button) findViewById (R.id. addContactButton2 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubintent_magazin = new Intent (pokypki. this ,
magazin. class );(intent_magazin);
import android.content. ContentValues;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
* Simple notes database
access helper class. Defines the basic CRUD operations
* for the notepad
example, and gives the ability to list all notes as well as
* retrieve or modify a
specific note.
* This has been improved
from the first version of this tutorial through the
* addition of better
error handling and also using returning a Cursor instead
* of using a collection
of inner classes (which is less scalable and not
public static final String KEY_TITLE = «title»;
public static final String KEY_BODY = «body»;
public static final String KEY_DATE = «date»;
public static final String KEY_LOC = «loc»;
public static final String KEY_ROWID = «_id»;
private static final String TAG = «NotesDbAdapter»;
private static final String DATABASE_CREATE =
«create table notes (_id
integer primary key autoincrement,»
+ «title text not null,
body text not null, date text not null, loc text not null);»;
private static final String DATABASE_NAME = «data»;
private static final String DATABASE_TABLE =
«notes»;
private static final int DATABASE_VERSION =
2;
private static class DatabaseHelper extends
SQLiteOpenHelper {
super (context, DATABASE_NAME , null , DATABASE_VERSION );
public void onCreate (SQLiteDatabase db) {
public void onUpgrade (SQLiteDatabase db, int oldVersion, int
newVersion) {. w ( TAG , «Upgrading database from version» +
oldVersion + «to»
+ newVersion +», which
will destroy all old data»);.execSQL («DROP TABLE IF EXISTS notes»);(db);
* Constructor - takes
the context to allow the database to be
* @param ctx the
Context within which to work
public NotesDbAdapter (Context ctx) {
* Open the notes
database. If it cannot be opened, try to create a new
* instance of the
database. If it cannot be created, throw an exception to
* @return this
(self reference, allowing this to be chained in an
* @throws
SQLException if the database could be neither opened or created
public NotesDbAdapter open() throws SQLException {= new
DatabaseHelper(mCtx);= mDbHelper.getWritableDatabase();
* Create a new note
using the title and body provided. If the note is
* successfully created
return the new rowId for that note, otherwise return
* @param title
the title of the note
public long createNote (String title, String body, String date)
{initialValues = new ContentValues();.put ( KEY_TITLE , title);.put
( KEY_BODY , body);.put ( KEY_DATE , date);.put ( KEY_LOC , «no
information»);
return mDb.insert ( DATABASE_TABLE , null , initialValues);
public long createNoteWithLoc (String title, String body, String
date, String loc) {initialValues = new ContentValues();.put ( KEY_TITLE ,
title);.put ( KEY_BODY , body);.put ( KEY_DATE , date);.put ( KEY_LOC ,
loc);
return mDb.insert ( DATABASE_TABLE , null , initialValues);
* Delete the note with
the given rowId
* @return true if
deleted, false otherwise
public boolean deleteNote ( long rowId) {
return mDb.delete ( DATABASE_TABLE , KEY_ROWID + «=» +
rowId, null ) > 0;
* Return a Cursor over
the list of all notes in the database
return mDb.query ( DATABASE_TABLE , new String[] { KEY_ROWID ,
KEY_TITLE ,
KEY_BODY , KEY_DATE , KEY_LOC }, null , null , null ,
null , null );
* Return a Cursor
positioned at the note that matches the given rowId
* @param rowId id
of note to retrieve
* @return Cursor
positioned to matching note, if found
* @throws
SQLException if note could not be found/retrieved
public Cursor fetchNote ( long rowId) throws SQLException {
.query ( true , DATABASE_TABLE ,
new String[] { KEY_ROWID ,
KEY_TITLE , KEY_BODY , KEY_DATE , KEY_LOC }, KEY_ROWID
+ «=» + rowId, null ,
* Update the note using
the details provided. The note to be updated is
* specified using the
rowId, and it is altered to use the title and body
* @param title
value to set note title to
* @param body
value to set note body to
* @return true if
the note was successfully updated, false otherwise
public boolean updateNote ( long rowId, String title,
String body, String date) {args = new ContentValues();.put ( KEY_TITLE ,
title);.put ( KEY_BODY , body);.put ( KEY_DATE , date);.put ( KEY_LOC ,
«no information»);
return mDb.update ( DATABASE_TABLE , args, KEY_ROWID + «=» +
rowId, null ) > 0;
public boolean updateNoteWithLoc ( long rowId, String
title, String body, String date, String loc) {args = new
ContentValues();.put ( KEY_TITLE , title);.put ( KEY_BODY ,
body);.put ( KEY_DATE , date);.put ( KEY_LOC , loc);
return mDb.update ( DATABASE_TABLE , args, KEY_ROWID + «=» +
rowId, null ) > 0;
import android.view. View. OnClickListener;
public class magazin extends Activity {
public void onCreate (Bundle savedValues) {
super .onCreate(savedValues);(R.layout. magazin );
// Capture our button
from layoutmap = (Button) findViewById (R.id. addContactButton );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubsh intent_seting1 = new Intent (magazin. this ,
ShopsMap. class );
button = (Button)
findViewById (R.id. addContactButton3 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubintent_seting = new Intent (magazin. this ,
seting. class );(intent_seting);
// Capture our button
from layoutbutton1 = (Button) findViewById (R.id. addContactButton1 );
// Register the onClick
listener with the implementation above.setOnClickListener ( new
OnClickListener() {
// TODO
Auto-generated method stubintent_pokypki = new Intent (magazin. this ,
pokypki. class );(intent_pokypki);
import android.view. View. OnClickListener;
public class GSS extends Activity {
/** Called when the
activity is first created. */
public void onCreate (Bundle savedInstanceState) {
super .onCreate(savedInstanceState);(R.layout. main );
final Button buttonMain = (Button) findViewById (R.id. button_main );
final Button buttonMain1 = (Button) findViewById (R.id. button_main1 );
.setOnClickListener ( new
OnClickListener() {
public void onClick (View v) {dialog = new
AddPurchaseDialor (GSS. this );.setTitle («Add new purchase»);.show();
.setOnClickListener ( new
OnClickListener() {
public void onClick (View e) {dialog2 = new AddShopDialog
(GSS. this );.setTitle («Add new shop»);
import android.view. View. OnClickListener;
public class AddShopDialog extends Dialog implements
OnClickListener {okButton;cancelButton;
public AddShopDialog (Context context) {
super (context);(R.layout. add_new_shop );= (Button) findViewById
(R.id. ok1 );.setOnClickListener( this );= (Button) findViewById
(R.id. cancel1 );.setOnClickListener( this );
{textView1 = (TextView)
findViewById (R.id. entry1 );.getText();textView2 = (TextView)
findViewById (R.id. entry2 );.getText();textView3 = (TextView)
findViewById (R.id. entry3 );.getText();();
Похожие работы на - Драйвер стандартних пристроїв введення-виведення Курсовая работа (т). Информационное обеспечение, программирование.
Курсовая работа: Средства и способы рекламы в СКС
Учебное пособие: Психология и педагогика Юнита 2
Контрольная Работа Основы Лесопаркового Хозяйства 3 Курс
Курсовая работа: Социальный аспект государственной службы
Архитектура Пк Реферат По Информатике
Реферат На Тему Правотворчество В Государстве И Его Формы
Реферат: Сходные судьбы двух недарвиновских концепций эволюции: Л.С.Бергa и Р.Гольдшмитa
Дипломная работа по теме Финансовое планирование деятельности ООО 'ГЛОБАЛ СТАФФ РЕСУРС'
Сочинение по теме Русский язык - основа национального единства и русской культуры
Реферат: Mark Twain Essay Research Paper title
Сделать Технико Экономическое Обоснование
Покупка блока мест на условиях комитмента
Реферат по теме Нравственное наследие Древней Руси в современной российской культуре
Доклад по теме Разум и Вселенная
Лабораторная работа: Комплексное методическое обеспечение предмета Технология
Сочинение Рассуждение Смерть Катерины Это Протест
Дипломная Работа На Тему Средства Учета Количества Электричества И Электрической Энергии
Публикация Дипломных Работ Ургэу Синх В Волгограде
Реферат: Классификация и потребительские свойства товаров отдела “мясная гастрономия”. Скачать бесплатно и без регистрации
Понятие Социальной Системы Реферат
Похожие работы на - Учет с поставщиками и подрядчиками
Реферат: Центральная нервная система, спинной мозг
Изложение: Райнер Мария Рильке. Записки Мальте Лауридса Бриге