Monday, March 16, 2020

Swift using Repl.it


Here is a circle app example using swift on Repl.it.

Ch7 Xamarin Circle class

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace Ch7Ex1Circle
{
    public class Circle
    {
        private double radius;

        public double Radius
        {
            get
            {
                return radius;
            }
            set
            {
                radius = value;
                if (radius < 0)
                    radius = radius * -1;
            }
        }

        public Circle(double radius)
        {
            this.Radius = radius;
        }

        public double getArea()
        {
            return Math.PI * radius * radius;
        }

        public double getCircumference()
        {
            return 2 * Math.PI * radius;
        }
    }

}

Monday, October 7, 2019



        let fn=tbFName.text;
        let ln=tbLName.text;
        if(fn == ""  || ln == "")
        {
            lblDisplay.text="Hello World!";
            
        }
        else
        {
            lblDisplay.text = fn!+" "+ln!;
        }

Thursday, June 13, 2019

Student Access Loan SAL

The Student Access Loan (SAL) Application for FY 2020 is scheduled to open on Thursday, June 13, 2019.
The application will be open while funds are available.
Please keep in mind, SAL applicants must have a 2019-2020 FASFA on record with GSFC in order to access the SAL application.
Selections will be done nightly and a list of your selected students will appear in SURFER in the SAL section.
The application, selection, certification, and loan approval process has not changed for last year.
Be advised: The FY 2020 SAL period will end June 12, 2020. That will be the last day for any SALs to be approved.
- This message brought to you by the Financial Aid Office
Student Access Loan SAL

Tuesday, May 28, 2019

Week3 Android Circle

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;

public class Circle {
    double radius;

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public Circle(double radius){
        this.radius = radius;
    }

    public double getArea(){
        return Math.PI * radius * radius;
    }

    public double getCircumference(){
        return 2 * Math.PI * radius;
    }

}

Monday, May 27, 2019

Here are the assignments for All 5 Platforms

You will develop 2 mobile apps:
1) Practice: An app the reads the radius and creates a circle object to calculate the area and circumference of the circle. I will give you an example of this for each chapter.
2) Assignment: An app that reads the length and width and creates a rectangle object to calculate the area and perimeter of the rectangle. Note you will add another textbox (input) control and create a constructor that take two parameters. 
Examples of constructors that take 2 parameters:
JavaScript:
    var myRect = new Rectangle(len,wid);
    //Rectangle.js
    constructor(len,wid)
    {
  this.length=len;
          this.width=wid;
    }
Java:
    Rectangle myRect = new Rectangle(l,w);
    //Rectangle.java
    public Rectangle(double length, double width)
    {
        this.length = length;
        this.width = width;
    }
C#:
    Rectangle myRect = new Rectangle (Double.Parse(etLength.Text),Double.Parse(etWidth.Text) );
    //Rectangle.cs
    public Rectangle (double length, double width)
   {
            this.length  = length;
            this.width  = width;
    }
Swift:
     let myRect=Rectangle(length:len!, width:wid! );
    //Rectangle.swift
     init(length: Double, width: Double) { // Constructor
        self.length= length
        self.width=width        
     }
You will implement the assignments on the following platforms:
  • MIT AppInventor
  • Android and Android studio, language is java.
  • Xamarin and Microsoft Visual Studio. lamguage is C#. 
  • iOS and Xcode , the language is Swift.
  • Cross Platform Web: with a code editor (replit.com is preferred), the language is HTML5, CSS and Javascript.

Week 4: MIT App Inventor (Android)

MIT App Inventor 2
Got an Android phone or tablet? Find out how to Set up and connect an Android device.
Don't have an Android device? Find out how to Set up and run the Android emulator.
How to SMS...
CampusSOS