Android Simple Student management system

Source: Internet
Author: User

(1) The functions of the management system are mainly: Students, teachers registration login, and elective courses, as well as modify students ' performance and other basic simple functions, the most important thing is to achieve some dialog use.
The interface is as follows:


(2) The main code is as follows: (personal leave notes, such as the need for complete code, at the bottom of the free download)

Below is an adapter that sets the value for a Listvie, where a itemview is loaded, and an inherited method is used in the adapter to notify the adapter to update.

 Public  class courseadapter extends baseadapter {    PrivateContext context;PrivateList<course> coursetlist; Public Courseadapter(context context, list<course> coursetlist) { This. Context = Context; This. coursetlist = coursetlist; } Public int GetCount() {returnCoursetlist.size (); } PublicObjectGetItem(intPosition) {returnCoursetlist.get (position); } Public Long Getitemid(intPosition) {returnPosition }/** * Notify adapter Update data */    @Override     Public void notifydatasetchanged() {Super. notifydatasetchanged (); } PublicViewGetView(intPosition, View Convertview, ViewGroup parent) {if(Convertview = =NULL) {//The layout file for each item entry loaded hereConvertview = Layoutinflater.from (context). Inflate (R.layout.student_score_item,NULL);        } TextView Tv_name = (TextView) Convertview.findviewbyid (r.id.tv_name);        TextView Tv_course = (TextView) convertview. Findviewbyid (R.id.tv_course); TextView Tv_score = (TextView) Convertview.findviewbyid (R.id.tv_score);//Get a student of a locationCourse Course = coursetlist.get (position); Tv_name.settext (Course.getstudentname () +""); Tv_course.settext (Course.getcoursename () +""); Tv_score.settext (Course.getcoursesocre () +"");returnConvertview; }}

(3) also uses the Java reflection mechanism, unifies the Factory mode to operate:

 Public  class personfactory {    /** * Produce objects according to the name of the class: the reflection mechanism of Java uses * * @param className * @return */     PublicPersoninterGetpersonbyclass(String className) {Try{Personinter Personinter = (personinter) class.forname (className). newinstance ();returnPersoninter; }Catch(Instantiationexception e)        {E.printstacktrace (); }Catch(Illegalaccessexception e)        {E.printstacktrace (); }Catch(ClassNotFoundException e)        {E.printstacktrace (); }return NULL; }/** * Create objects by type * /     PublicPersoninterGethair(String key) {if("Student". Equals (key)) {return NewStudentimpl (); }Else if("Teacher". Equals (key)) {return NewTeacherimpl (); }return NULL; }/** * Produce objects according to the name of the class: Map of Java */     PublicPersoninterGetpersonbyclasskey(String key) {Try{map<string, string> Map =NewPropertiesreader (). GetProperties (); Personinter person = (personinter) class.forname (Map.get (Key)). Newinstance ();returnPerson }Catch(Instantiationexception e)        {E.printstacktrace (); }Catch(Illegalaccessexception e)        {E.printstacktrace (); }Catch(ClassNotFoundException e)        {E.printstacktrace (); }return NULL; }}

Project Source: Http://yunpan.cn/cVHSjNCeRxZqV access Password 96DD

Android Simple Student management system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.