Cloud Computing: Concepts

Topic:  Cloud Security (based on content from Chapter 6 in Cloud Computing: Concepts, Technology & Architecture)

Overview:  The diagram provided in the assignment rubric illustrates interaction between two cloud service consumers (A and B) and two virtual servers (A and B) hosted on a cloud.

Based on the limited information provided in the depicted scenario, describe three types of attacks that could potentially be carried out if any of the programs outside of the cloud were malicious.

Provide a brief explanation justifying the threat of each proposed attack. For each of the three types of attacks, please list and describe a potential cause.

Please ensure you refer to the attached document for details on the requirements for this assignment!

2 ) Discussion: 

 

In your initial post, discuss the differences between Virtualization and Cloud Computing.

Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What challenges did they face?

minimum of 500 words.

INFORMATION TECHNOLOGY DISASTER RECOVERY PLAN

INFORMATION TECHNOLOGY DISASTER RECOVERY PLAN

 

Revision History

 

RevisionChangeDate
   
   
   
   
   
   
   

 

 

 

Official copies of the document are available at the following locations:

· Department of Information Technology Office

· Office and home of the Chief Information Officer

 

10

Contents

Revision History 1 Official copies of the document are available at the following locations: 1 Contents 2 Section 1: Introduction 3 Section 2: Scope 3 Section 3: Assumptions 3 Section 4: Definitions 3 Section 5: Teams 3 5.0.1 Incident Commander 3 5.0.2 Incident Command Team 3 5.1 Datacenter Recovery Team 3 5.2 Desktop, Lab, and Classroom Recovery Team 4 5.3 Enterprise Systems Recovery Team 4 5.4 Infrastructure and Web Recovery Team 4 5.5 Telecommunications, Network, and Internet Services Recovery Team 4 Section 6: Recovery Preparations 5 6.1 Data Recovery Information: 5 6.2 Central Datacenter and Server Recovery Information: 5 6.3 Network and Telecommunication Recovery Information: 5 6.4 Application Recovery Information: 5 6.5 Desktop Equipment Recovery Information: 5 Section 7: Disaster Recovery Processes and Procedures 5 7.1 Emergency Response: 5 7.2 Incident Command Team: 5 7.3 Disaster Recovery Teams: 5 7.4 General System/Application Recovery Procedures/Outline: 5 8.0 Network & Telecommunication Recovery Guidelines: 7 Appendix A. IT Contact List 7 Appendix B. Crisis Management Team Contact List 7 Appendix C: IT Recovery Priority List 7 C.1 IT Infrastructure Priorities: 7 C.2 IT System Priorities: 8 C.3 Consortium, Outsourced, and Cloud-based IT System Priorities: 8 C.4 IT Facility Priorities 9 Appendix D: Vendor Information 9 Appendix E: Disaster Recovery Signoff Sheet 10

 

Section 1: Introduction

Provide an introduction to the company/situation…

A copy of this plan is stored in the following areas:

 

· Department of Information Technology Office

· Office and home of the Chief Information Officer

 

Section 2: Scope

Determine/explain the scope of this plan.

 

 

Section 3: Assumptions

 

 

Section 4: Definitions

 

 

Section 5: Teams

5.0.1 Incident Commander

 

Chief Information Officer 
Home Phone: 
Cell Phone: 

 

5.0.2 Incident Command Team

 

Chief Information Officer 
Manager, User Support 
Manager, Infrastructure Services 
Manager, Information Systems 
Manager, Classroom and Media Services 

 

5.1 Datacenter Recovery Team

All Contact Information is located in Appendix A

 

 

 

 

 

 

 

 

 

 

 

 

Team Lead:Manager, Infrastructure Services
Team Members:System Administrators (2)
 Desktop Systems Administrator
 Network Communications Technicians (2)

 

 

5.2 Desktop, Lab, and Classroom Recovery Team

All Contact Information is located in Appendix A

Commander.

 

Team Lead:Manager, User Services
Team Members:Manager, Classroom and Media Services
 Desktop Systems Administrator
 Computing Coordinators (7)
 Lab and Student Computing Coordinator
 Equipment Systems Specialist

 

 

5.3 Enterprise Systems Recovery Team

All Contact Information is located in Appendix A

 

Team Lead:Manager, Information Systems
Team Members:Manager, Infrastructure Services
 Programmer/Analysts (4)
 Web Programmer/Analyst
 System Administrator
 Computing Coordinators supporting affected areas (business services, payroll, enrollment

services, etc.)

 Key Business Unit Personnel as needed by type of incident (payroll clerk, accountant,

registrar, etc.)

 

 

5.4 Infrastructure and Web Recovery Team

All Contact Information is located in Appendix A

Commander.

 

Team Lead:Manager, Infrastructure Services
Team Members:System Administrators (2)
 Desktop Systems Administrator
 Web Programmer/Analyst

 

 

5.5 Telecommunications, Network, and Internet Services Recovery Team

All Contact Information is located in Appendix A

Commander.

 

Team Lead:Manager, Infrastructure Services
Team Members:Communications Technicians (2)
 System Administrator

 

 

Section 6: Recovery Preparations

 

6.1 Data Recovery Information:

 

6.2 Central Datacenter and Server Recovery Information:

 

6.3 Network and Telecommunication Recovery Information:

 

6.4 Application Recovery Information:

 

6.5 Desktop Equipment Recovery Information:

Section 7: Disaster Recovery Processes and Procedures

7.1 Emergency Response:

 

7.2 Incident Command Team:

 

7.3 Disaster Recovery Teams:

7.4 General System/Application Recovery Procedures/Outline:

 

 

8.0 Network & Telecommunication Recovery Guidelines:

Appendix A. IT Contact List

 

 

Appendix B. Crisis Management Team Contact List

 

 

Appendix C: IT Recovery Priority List

The following priorities have been established by the department of Information Technology with consultation from the campus community.

 

C.1 IT Infrastructure Priorities:

 

C.2 IT System Priorities:

 

 

C.3 Consortium, Outsourced, and Cloud-based IT System Priorities:

 

Application/System NamePriorityRTORPO
    
    
    
    
    
    
    
    
    
    
    
    
    

 

(1) Critical – Basic infrastructure and must be restored as soon as possible.

(2) High – Systems of extreme importance, but do not provide infrastructure.

(3) Medium – Important systems and applications, but do not have university-wide impact.

(4) Low – Systems important to specific departments or specific small populations of users.

(5) Full –Systems that may not be restored to functional status until normal operations are reestablished.

Note: RTO is recovery time objective, RPO is recovery point objective

 

C.4 IT Facility Priorities

 

Building NamePriority
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

 

Note: building list continues on next page.

 

(1) Critical, needed for maintenance of public health and safety, communications.

(2) High, needed for income maintenance for students, employees; payments to vendors; requirements for compliance or regulation; effect on cash flow; effect on production and delivery of services (housing, dining, student services).

(3) Medium, needed for mission of university, delivery of classes.

(4) Low, everything else

 

 

 

Appendix D: Vendor Information

 

Appendix E: Disaster Recovery Signoff Sheet

I have been briefed and given an overview of the Disaster Recovery Plan and I am familiar with my responsibilities.

 

NameSignatureDate
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

Displaying Accounts and Transactions in the Banking System

Displaying Accounts and Transactions in the Banking System

Expand the Banking System from Lab 2 to display accounts and transactions.

Perform the following.

1. After a successful Login, develop the elements to display a list of accounts for the user.

2. Provide the ability for the user to select an account to display.

3. Develop the elements for displaying the transactions for the selected account. Display the running balance for the account.

When completed, place the project file into a zip file and submit it to Canvas.

(Using Lab1 source code we need to create all the above functionalities in Lab3 and code need to be without errors and operational).

Banking System

Lab 1/Banking System/build.xml

Builds, tests, and runs the project Banking System.

Lab 1/Banking System/build/classes/.netbeans_automatic_build

Lab 1/Banking System/build/classes/.netbeans_update_resources

Lab 1/Banking System/build/classes/banking/BankingSystem.class

package banking;
public synchronized class BankingSystem {
    public void BankingSystem();
    public static void main(String[]);
}

Lab 1/Banking System/build/classes/banking/database/AccountDA.class

package banking.database;
public synchronized class AccountDA {
    public static java.util.ArrayList accounts;
    public void AccountDA();
    public static void add(banking.domain.Account);
    public static java.util.ArrayList getCustomerAccounts(int);
    public static void initialize();
    static void <clinit>();
}

Lab 1/Banking System/build/classes/banking/database/CustomerDA.class

package banking.database;
public synchronized class CustomerDA {
    private static java.util.ArrayList customers;
    public void CustomerDA();
    public static void add(banking.domain.Customer);
    public static java.util.ArrayList getCustomers();
    public static void inititialize();
    static void <clinit>();
}

Lab 1/Banking System/build/classes/banking/database/TransactionDA.class

package banking.database;
public synchronized class TransactionDA {
    private static java.util.ArrayList transactions;
    public void TransactionDA();
    public static void add(banking.domain.Transaction);
    public static java.util.ArrayList getAccountTransactions(int);
    public static void initialize();
    static void <clinit>();
}

Lab 1/Banking System/build/classes/banking/domain/Account.class

package banking.domain;
public abstract synchronized class Account {
    private int accountNumber;
    private int customerID;
    private String accountName;
    private java.util.Date dateOpened;
    public void Account();
    public void add();
    public String getAccountName();
    public int getAccountNumber();
    public static java.util.ArrayList getCustomerAccounts(int);
    public int getCustomerID();
    public java.util.Date getDateOpened();
    public java.util.ArrayList getTransactions();
    public static void initialize();
    public void setAccountName(String);
    public void setAccountNumber(int);
    public void setCustomerID(int);
    public void setDateOpened(java.util.Date);
    public String toString();
}

Lab 1/Banking System/build/classes/banking/domain/Asset.class

package banking.domain;
public synchronized class Asset extends Account {
    public void Asset();
}

Lab 1/Banking System/build/classes/banking/domain/Customer.class

package banking.domain;
public synchronized class Customer {
    private int customerID;
    private String name;
    private long phoneNumber;
    public void Customer();
    public void add();
    public static void add(Customer);
    public java.util.ArrayList getAccounts();
    public int getCustomerID();
    public static java.util.ArrayList getCustomers();
    public String getName();
    public long getPhoneNumber();
    public void setCustomerID(int);
    public void setName(String);
    public void setPhoneNumber(long);
    public static void initialize();
    public String toString();
}

Lab 1/Banking System/build/classes/banking/domain/Liability.class

package banking.domain;
public synchronized class Liability extends Account {
    public void Liability();
}

Lab 1/Banking System/build/classes/banking/domain/Transaction.class

package banking.domain;
public synchronized class Transaction {
    private double amount;
    private int transactionID;
    private java.util.Date transactionDate;
    private int accountNumber;
    private String description;
    public void Transaction();
    public void add();
    public int getAccountNumber();
    public double getAmount();
    public static java.util.ArrayList getAccountTransactions(int);
    public String getDescription();
    public java.util.Date getTransactionDate();
    public int getTransactionID();
    public static void initialize();
    public void setAccountNumber(int);
    public void setAmount(double);
    public void setDescription(String);
    public void setTransactionDate(java.util.Date);
    public void setTransactionID(int);
    public String toString();
}

Lab 1/Banking System/manifest.mf

Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build

Lab 1/Banking System/nbproject/build-impl.xml

Must set src.dir Must set test.src.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar Must set javac.includes No tests executed. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent

Lab 1/Banking System/nbproject/genfiles.properties

build.xml.data.CRC32=db319861 build.xml.script.CRC32=538a4852 build.xml.stylesheet.CRC32=8064a381@1.80.1.48 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=db319861 nbproject/build-impl.xml.script.CRC32=ae7b57ca nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

Lab 1/Banking System/nbproject/private/private.properties

compile.on.save=true user.properties.file=C:\\Users\\dstrong\\AppData\\Roaming\\NetBeans\\8.2\\build.properties

Lab 1/Banking System/nbproject/private/private.xml

file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Projects/Labs/Banking%20System/Banking%20System/src/banking/domain/Transaction.java file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Projects/Labs/Banking%20System/Banking%20System/src/banking/database/TransactionDA.java

Lab 1/Banking System/nbproject/project.properties

annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath=\ ${run.classpath} debug.test.classpath=\ ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/Banking_System.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=true javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= main.class=banking.BankingSystem manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the project. # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys-prop.name=value: run.jvmargs= run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src test.src.dir=test

Lab 1/Banking System/nbproject/project.xml

org.netbeans.modules.java.j2seproject Banking System

Lab 1/Banking System/src/banking/BankingSystem.java

Lab 1/Banking System/src/banking/BankingSystem.java

package  banking ;

import  banking . domain . Customer ;
import  banking . domain . Account ;
import  banking . domain . Transaction ;
import  java . util . ArrayList ;

public   class   BankingSystem   {

public   static   void  main ( String []  args )   {
Customer . initialize ();
Account . initialize ();
Transaction . initialize ();

ArrayList < Customer >  customers  =   Customer . getCustomers ();

for ( int  i  =   0 ;  i  <  customers . size ();  i ++ ){
System . out . println ( customers . get ( i ));
}
}
}

Lab 1/Banking System/src/banking/database/AccountDA.java

Lab 1/Banking System/src/banking/database/AccountDA.java

package  banking . database ;

import  banking . domain . Account ;
import  banking . domain . Asset ;
import  banking . domain . Liability ;

import  java . util . ArrayList ;
import  java . util . Date ;

public   class   AccountDA   {
public   static   ArrayList < Account >  accounts  =   new   ArrayList < Account > ( 5 );

public   static   void  add ( Account  acc )   {
accounts . add ( acc );
}

public   static   ArrayList < Account >  getCustomerAccounts ( int  custID )   {
Account  acc ;
ArrayList < Account >  customerAccounts  =   new   ArrayList < Account > ( 5 );

for ( int  i  =   0 ;  i  <  accounts . size ();  i ++ )   {
acc  =  accounts . get ( i );
if   ( acc . getCustomerID ()   ==  custID )
customerAccounts . add ( acc );
}

return  customerAccounts ;
}

public   static   void  initialize (){
Account  a ;
Date  today  =   new   Date ();

a  =   new   Asset ();
a . setAccountNumber ( 10101 );
a . setCustomerID ( 101 );
a . setAccountName ( "Customer One Checking Account" );
a . setDateOpened ( today );
a . add ();

a  =   new   Asset ();
a . setAccountNumber ( 10102 );
a . setCustomerID ( 101 );
a . setAccountName ( "Customer One Savings Account" );
a . setDateOpened ( today );
a . add ();

a  =   new   Asset ();
a . setAccountNumber ( 10201 );
a . setCustomerID ( 102 );
a . setAccountName ( "Savings Account" );
a . setDateOpened ( today );
a . add ();

a  =   new   Liability ();
a . setAccountNumber ( 10202 );
a . setCustomerID ( 102 );
a . setAccountName ( "Customer Two Credit Card" );
a . setDateOpened ( today );
a . add ();
}
}

Lab 1/Banking System/src/banking/database/CustomerDA.java

Lab 1/Banking System/src/banking/database/CustomerDA.java

package  banking . database ;

import  banking . domain . Customer ;
import  java . util . ArrayList ;

public   class   CustomerDA   {
private   static   ArrayList < Customer >  customers  =   new   ArrayList < Customer > ( 5 );

public   static   void  add ( Customer  c )   {
customers . add ( c );
}

public   static   ArrayList < Customer >  getCustomers ()   {
return  customers ;
}

public   static   void  inititialize ()   {
Customer  c ;

c  =   new   Customer ();
c . setCustomerID ( 101 );
c . setName ( "Customer One" );
c . setPhoneNumber ( 5551212 );
c . add ();

c  =   new   Customer ();
c . setCustomerID ( 102 );
c . setName ( "Customer Two" );
c . setPhoneNumber ( 4442323 );
c . add ();
}
}

Lab 1/Banking System/src/banking/database/TransactionDA.java

Lab 1/Banking System/src/banking/database/TransactionDA.java

package  banking . database ;

import  banking . domain . Transaction ;

import  java . util . ArrayList ;
import  java . util . Date ;

public   class   TransactionDA   {
private   static   ArrayList < Transaction >  transactions  =   new   ArrayList < Transaction > ( 5 );

public   static   void  add ( Transaction  trans )   {
trans . setTransactionID ( transactions . size ()   +   1 );
transactions . add ( trans );
}

public   static   ArrayList < Transaction >  getAccountTransactions ( int  accNo ){
ArrayList < Transaction >  accountTransactions  =   new   ArrayList < Transaction > ( 5 );
Transaction  trans ;

for   ( int  i  =   0 ;  i  <  transactions . size ();  i ++ )   {
trans  =  transactions . get ( i );
if   ( accNo  ==  trans . getAccountNumber ())
accountTransactions . add ( trans );
}
return  accountTransactions ;
}

public   static   void  initialize ()   {
Transaction  t ;
Date  today  =   new   Date ();

t  =   new   Transaction ();
t . setAccountNumber ( 10101 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 1" );
t . setAmount ( 100 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10101 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 2" );
t . setAmount ( - 21.95 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10101 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 3" );
t . setAmount ( 16.25 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10102 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 1" );
t . setAmount ( 50.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10102 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 2" );
t . setAmount ( 250.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10102 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 3" );
t . setAmount ( - 10.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10202 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 1" );
t . setAmount ( 500.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10202 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 2" );
t . setAmount ( - 50.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10202 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 3" );
t . setAmount ( 25.00 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10201 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 1" );
t . setAmount ( 49.75 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10201 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 2" );
t . setAmount ( 16.25 );
t . add ();

t  =   new   Transaction ();
t . setAccountNumber ( 10201 );
t . setTransactionDate ( today );
t . setDescription ( "Transaction 3" );
t . setAmount ( - 25.0 );
t . add ();
}
}

Lab 1/Banking System/src/banking/domain/Account.java

Lab 1/Banking System/src/banking/domain/Account.java

package  banking . domain ;

import  banking . database . AccountDA ;
import  java . util . Date ;
import  java . util . ArrayList ;

public   abstract   class   Account   {
private   int  accountNumber ;
private   int  customerID ;
private   String  accountName ;
private   Date  dateOpened ;

public   void  add ()   {
AccountDA . add ( this );
}

public   String  getAccountName ()   {
return  accountName ;
}

public   int  getAccountNumber ()   {
return  accountNumber ;
}

public   static   ArrayList < Account >  getCustomerAccounts ( int  custID )   {
return   AccountDA . getCustomerAccounts ( custID );
}

public   int  getCustomerID ()   {
return  customerID ;
}

public   Date  getDateOpened ()   {
return  dateOpened ;
}

public   ArrayList < Transaction >  getTransactions ()   {
return   Transaction . getAccountTransactions ( accountNumber );
}

public   static   void  initialize ()   {
AccountDA . initialize ();
}

public   void  setAccountName ( String  accountName )   {
this . accountName  =  accountName ;
}

public   void  setAccountNumber ( int  accountNumber )   {
this . accountNumber  =  accountNumber ;
}

public   void  setCustomerID ( int  customerID )   {
this . customerID  =  customerID ;
}

public   void  setDateOpened ( Date  dateOpened )   {
this . dateOpened  =  dateOpened ;
}

public   String  toString ()   {
ArrayList < Transaction >  transactions  =  getTransactions ();
double  sum  =   0.0 ;

String  returnString  =   "Account: "   +  accountNumber  +   " "   +  accountName  +   " "   +  dateOpened ;
for   ( int  i  =   0 ;  i  <  transactions . size ();  i ++ ){
sum  =  sum +=  transactions . get ( i ). getAmount ();
returnString  =  returnString  +   "\n          "   +  transactions . get ( i )   +   "  "   +  sum ;
}

return  returnString ;
}

}

Lab 1/Banking System/src/banking/domain/Asset.java

Lab 1/Banking System/src/banking/domain/Asset.java

package  banking . domain ;

public   class   Asset   extends   Account   {

}

Lab 1/Banking System/src/banking/domain/Customer.java

Lab 1/Banking System/src/banking/domain/Customer.java

package  banking . domain ;

import  banking . database . CustomerDA ;
import  banking . domain . Account ;
import  java . util . ArrayList ;

public   class   Customer   {
private   int  customerID ;
private   String  name ;
private   long  phoneNumber ;

public   void  add ()   {
CustomerDA . add ( this );
}

public   static   void  add ( Customer  c )   {
CustomerDA . add ( c );
}

public   ArrayList < Account >  getAccounts ()   {
return   Account . getCustomerAccounts ( customerID );
}

public   int  getCustomerID ()   {
return  customerID ;
}

public   static   ArrayList < Customer >  getCustomers ()   {
return   CustomerDA . getCustomers ();
}

public   String  getName ()   {
return  name ;
}

public   long  getPhoneNumber ()   {
return  phoneNumber ;
}

public   void  setCustomerID ( int  customerID )   {
this . customerID  =  customerID ;
}

public   void  setName ( String  name )   {
this . name  =  name ;
}

public   void  setPhoneNumber ( long  phoneNumber )   {
this . phoneNumber  =  phoneNumber ;
}

public   static   void  initialize ()   {
CustomerDA . inititialize ();
}

public   String  toString ()   {
String  returnString  =   "\nCustomer "   +  customerID  +   " "   +  name ;
ArrayList < Account >  accounts  =  getAccounts ();

for   ( int  i  =   0 ;  i  <  accounts . size ();  i ++ )   {
returnString  =  returnString  +   "\n     "   +  accounts . get ( i );
}

return  returnString ;
}
}

Lab 1/Banking System/src/banking/domain/Liability.java

Lab 1/Banking System/src/banking/domain/Liability.java

package  banking . domain ;

public   class   Liability   extends   Account {

}

Lab 1/Banking System/src/banking/domain/Transaction.java

Lab 1/Banking System/src/banking/domain/Transaction.java

package  banking . domain ;

import  banking . database . TransactionDA ;

import  java . util . ArrayList ;
import  java . util . Date ;

public   class   Transaction   {
private   double  amount ;
private   int  transactionID ;
private   Date  transactionDate ;
private   int  accountNumber ;
private   String  description ;

public   void  add ()   {
TransactionDA . add ( this );
}

public   int  getAccountNumber ()   {
return  accountNumber ;
}

public   double  getAmount ()   {
return  amount ;
}

public   static   ArrayList < Transaction >  getAccountTransactions ( int  accNo )   {
return   TransactionDA . getAccountTransactions ( accNo );
}

public   String  getDescription ()   {
return  description ;
}

public   Date  getTransactionDate ()   {
return  transactionDate ;
}

public   int  getTransactionID ()   {
return  transactionID ;
}

public   static   void  initialize ()   {
TransactionDA . initialize ();
}

Building a Calculator

Lab #1 — Building a Calculator

Your task for Lab #1 is to build a calculator in Java that has two modes, controllable by command-line options postfix and infix. In both modes the calculator will read lines of input from standard input. For each input line, the calculator will evaluate the expression that was input and print the result on a separate line. The program ends when it encounters the EOF character,similar to the behavior of most Unix utilities.

To simplify matters regarding dealing with different types of numbers, in this assignment, all numbers are to be represented internally as either Java floatprimitives or Floatobjects depending on your implementation choices.

Your calculator will implement the following operations:

  • +, -, *, /
  • ^ (exponentiation: e.g., 2^3 = 8).

Your calculator will implement expressions containing either a sole number or operations applied to numbers.

Mode #1 — Postfix Notation

The first mode that you will implement is one where the calculator accepts anexpression that is expressed in postfix notation. For those of you familiar with HP’s line of scientific and graphing calculators, postfix notation is also known as RPN or Reverse Polish Notation, in honor of the Polish logician Jan Łukasiewicz who invented Polish notation, also known as prefix notation.

Here are examples of expressions written in postfix notation with their conversions to infix notation and their evaluations:

2 3 +

2 + 3

5

2 3 + 5 *

(2 + 3) * 5

25

2 3 5 * +

2 + (3 * 5)

17

2 3 2 ^ * -10 –

2 * (3 ^ 2) – -10

28

How an RPN calculator works internally is as follows: it maintains an internal stack that is used to store operands and intermediate results. Let’s use the expression “4 3 + 5 *” as an example. The first thing that we do is lexical analysis on the input string by first splitting the string by its whitespace characters and then performing the proper type conversions on the numbers, resulting in a list that looks like this:

[4.0, 3.0, “+”, 5.0, “*”]

Next, we iterate through the list. For each number, we push it onto the stack. Once we reach an operator on the list, we pop the stack twice, perform that operation on the popped numbers, and then push the result onto the stack. In this example, the elements 3.0 and 4.0 are popped from the stack. We then perform the “+” operation on the second and first elements popped from the stack (order matters for “-”, “/”, and “^”), and then push the result (12.0) onto the stack. Then, as we continue iterating through the list, we encounter 5.0, and thus we push it on the stack, resulting in a stack with the elements 12.0 (bottom) and 5.0 (top). Finally, the last token in the list is “*”, and so we pop the stack twice, multiplying 5.0 and 12.0 to get 60.0, and then we push it back on the stack.

When we have exhausted the list of tokens, we pop the stack and print the popped value as the result of the expression.

One of the nice properties of postfix notion is the lack of a need to specify operator precedence. It is this property that makes it possible to implement an RPN calculator without the need for specify a formal grammar for expressions. In fact, there are full-fledged programming languages such as Forth and PostScript that use postfix notation and rely on a stack.

Mode #2 — Infix Notation

Unlike a postfix calculator where parsing is a very straightforward task, parsing is not as straightforward in infix notation, since you have to concern yourself with expressions of arbitrary length and operator precedence. Your calculator will have to properly implement the PEMDAS (parentheses, exponents, multiplication, division, addition, subtraction) order of operations that are from elementary algebra.

Thankfully with the help of parser generators such as ANTLR, you won’t have to deal with the labor of implementing parsing algorithms.

Here is an excellent tutorial for using ANTLR:https://tomassetti.me/antlr-mega-tutorial/ (Links to an external site.). Please also refer to the main ANTLR website athttps://www.antlr.org (Links to an external site.).

Your goals are the following:

  1. Write a BNF or EBNF grammar that is able to represent expressions in infix notation that is also able to implement the PEMDAS order of operations.
  2. Express that grammar as an ANTLR grammar.
  3. Use ANTLR to generate an abstract syntax tree.
  4. Traverse the abstract syntax tree to evaluate the expression. There are two ways of doing this: (1) either evaluating the abstract syntax tree directly, or (2) using the AST to generate a postfix notation representation of the expression, and then evaluating it as in Mode #1.

Some Examples:

$ java Calculator postfix

Calculator> 2 4 * 2 ^ 10 –

54

Calculator> 5

5

Calculator> 8 24 + 9 –

23

$ java Calculator infix

Calculator> (2 * 4)^2 – 10

54

Calculator> 5

5

Calculator> 8 + 24 – 9

23

Deliverable:

A collection of Java and ANTLR source code files in a *.zip archive, where the main method is located in a class called Calculator and in a file called Calculator.java.

Grading Rubric:

Mode #1 (Postfix Notation): 30%

Mode #2 (Infix Notation Grammar and Parsing): 50%

Mode #2 (Infix Notation Evaluation): 20%

Note:Your code must compile in order for it to receive any credit; any submission that does not compile will receive a grade of 0%.

 

Adder.java

Adder.g4

grammar Adder; WS : [ \t\r\n]+ -> skip ; Num : (‘-‘)?[0-9]+ | (‘-‘)?[0-9]+’.'[0-9]+ ; expr : expr ‘+’ expr # addExpr | Num # numExpr ; start : expr EOF ; Error : . ;

Adder.java

Adder.java

import  org . antlr . v4 . runtime . * ;
import  org . antlr . v4 . runtime . tree . * ;
import  java . io . * ;

public   class   Adder   {
public   static   void  main ( String []  args )   throws   IOException   {
BufferedReader  in  =
new   BufferedReader ( new   InputStreamReader ( System . in ));
CharStream  inputStream  =   CharStreams . fromReader ( in );
AdderLexer  lexer  =   new   AdderLexer ( inputStream );
CommonTokenStream  commonTokenStream  =   new   CommonTokenStream ( lexer );
AdderParser  parser  =   new   AdderParser ( commonTokenStream );
parser . setErrorHandler ( new   BailErrorStrategy ());

ParseTree  tree  =  parser . start ();
AdderInterpreter  interpreter  =   new   AdderInterpreter ();
Float  result  =  interpreter . visit ( tree );
System . out . println ( result . toString ());
}
}

AdderInterpreter.java

AdderInterpreter.java

public   class   AdderInterpreter   extends   AdderBaseVisitor < Float >   {
@ Override
public   Float  visitAddExpr ( AdderParser . AddExprContext  ctx )   {
float  result  =  visit ( ctx . expr ( 0 )). floatValue ()   +
visit ( ctx . expr ( 1 )). floatValue ();
return   Float . valueOf ( result );
}

@ Override
public   Float  visitNumExpr ( AdderParser . NumExprContext  ctx )   {
return   Float . valueOf ( ctx . Num (). getText ());
}

@ Override
public   Float  visitStart ( AdderParser . StartContext  ctx )   {
return  visit ( ctx . expr ());
}
}

There are two parts to lab lesson 8. The entire lab will be worth 100 points.

Part of lab lesson 8

There are two parts to lab lesson 8. The entire lab will be worth 100 points.

Lab lesson 8 part 2 is worth 50 points

For part 2 you will have 40 points if you enter the program and successfully run the program tests. An additional 10 points will be based on the style and formatting of your C++ code.

Style points

The 10 points for coding style will be based on the following guidelines:

  • Comments at the start of your programming with a brief description of the purpose of the program.
  • Comments throughout your program
  • Proper formatting of your code (follow the guidelines in the Gaddis text book, or those used by your CS 1336 professor)
  • If you have any variables they must have meaningful names.

Development in your IDE

For lab lesson 8 (both parts) you will be developing your solutions using an Integrated Development Environment (IDE) such as Visual Studio, Code::Blocks or Eclipse. You should use whatever IDE you are using for your CS 1336 class. Once you have created and tested your solutions you will be uploading the files to zyBooks/zyLabs. Your uploaded file must match the name specified in the directions for the lab lesson. You will be using an IDE and uploading the appropriate files for this and all future lab lessons.

For this and all future labs the name of the source files must be:

lessonXpartY.cpp

Where X is the lab lesson number (8 for lab lesson 8) and Y is the part number (1 for part 1, 2 for part 2).

You will need to develop and test the program in your IDE. Once you are satisfied that it is correct you will need to upload the source file to zyBooks/zyLabs, and submit it for the Submit mode tests. If your program does not pass all of the tests you need to go back to the IDE, and update your program to fix the problems you have with the tests. You must then upload the program from the IDE to zyBooks/zylabs again. You can then run the tests again in Submit mode.

When running your program in Submit mode it is very important that you look at the output from all of the tests. You should then try and fix all of the problems in your IDE and then upload the updated code to zyBooks/zyLabs.

C++ requirements

You are not allowed to use any global variables. Use of global variables will result in a grade of zero for part 1.

Your program must have function main, function presentValue, three read functions, and a display function. Including main this is six functions.

The presentValue function must have the following signature:

double presentValue(double futureValue, double interestRate, int numberYears)

The presentValue needs to calculate the present value and return that back to the calling function. The formula for this is above. Note that the annual interest would be .08 for 8%.

Failure to follow the C++ requirements could reduce the points received from passing the tests.

General overview

In part 2 you will be creating multiple functions to calculate the present value.

You may be asking what a “present value” is. Suppose you want to deposit a certain amount of money into a savings account and then leave it alone to draw interest for some amount of time, say 12 years. At the end of the 12 years you want to have $15,000 in the account. The present value is the amount of money you would have to deposit today to have $15,000 in 12 years.

The formula used needs the future value (F) and annual interest rate (r) and the number of years (n) the money will sit in the account, unchanged. You will be calculating the present value (P).

P = F / ( (1 + r) ^ n)

In the above expression the value (1 + r) needs to be raised to the nth power. Assume that ^ is the power function and x^2 is x to the 2nd power (x squared)

You are not allowed to use any global variables. Use of global variables will result in a grade of zero for part 2.

Three read functions

You must have functions to read in the future value, the annual interest rate, and the number of years. That would be three different functions. Give these functions meaningful names. Note that the order of the values will be future value, annual interest rate, and number of years.

In all cases you need to return any valid value back to the calling function.

For all three functions you will write out to cout as prompt for an input value. You will read in that value from cin. If the value is invalid (zero or negative) you need to display an error message and reread the value (with another prompt). You need to do this in a loop and continue looping until a valid value has been entered. Only the number of years can be an int value. The rest should be of type double.

Here are the prompts for the three values you need to read in:

Enter future value
Enter annual interest rate
Enter number of years

Note that the interest rate will be a number such as 10 or 12.5. These are to be read in as percentages (10% and 12.5%). You will need to divide these values by 100 to convert them into the values needed in the function (.1 and .125 for the above values). This conversion needs to be done before you call the presentValue function (see below). If you do the conversion in the presentValue function your program will fail the unit tests, so do the conversion before you call the calculate function.

Here are the error messages you need to display if the values are negative:

The future value must be greater than zero
The annual interest rate must be greater than zero
The number of years must be greater than zero

You will also need a function called presentValue with the following signature:

double presentValue(double futureValue, double interestRate, int numberYears)

The presentValue needs to calculate the present value and return that back to the calling function. The formula for this is above. Note that the annual interest would be .08 for 8%.

Note that the interest rate will be a number such as 10 or 12.5. These are to be read in as percentages (10% and 12.5%). You will need to divide these values by 100 to convert them into the values needed in the function (.1 and .125 for the above values). This conversion needs to be done before you call the presentValue function (see below). If you do the conversion in the presentValue function your program will fail the unit tests, so do the conversion before you call the calculate function.

The display function

You also need a function that displays the present value, future value, interest rate, and number of years. The function needs to display the interest rate as %, so .05 would display as 5.000%. Give your display function a meaningful name. You will be passing a number of values to this function.

Here is the sample output for a present value of $69,046.56, a future value of $100,000, an interest rate of 2.5% and a number of years of 15,

Present value: $69046.56
Future value: $100000.00
Annual interest rate: 2.500%
Years: 15

Note that the present value and future value have three digits of precision to the right of the decimal point but the interest rate only has one digit to the right of the decimal point.

The main function will be the driver for your program.

Your program will only be processing one set of valid values for future value, annual interest rate and number of years.

Get the values for these by calling the read functions you created above.

Once you have the values you need to call your presentValue. Using the result from the presentValue and the input values you read in with your read functions you need to call your display function (written above) to display the values.

The main function

The main function will be the driver for your program. All of the non-main functions are called from main.

For the following sample run assume the input is as follows:

1000000.0
5.0
25

Your program should output the following:

Enter future value
Enter annual interest rate
Enter number of years
Present value: $295302.77
Future value: $1000000.00
Annual interest rate: 5.000%
Years: 25

Here is an example with some invalid data

Input values:

-100
0
1000000.0
5.0
25

Output:

Enter future value
The future value must be greater than zero
Enter future value
The future value must be greater than zero
Enter future value
Enter annual interest rate
Enter number of years
Present value: $295302.77
Future value: $1000000.00
Annual interest rate: 5.000%
Years: 25

Failure to follow the requirements for lab lessons can result in deductions to your points, even if you pass the validation tests. Logic errors, where you are not actually implementing the correct behavior, can result in reductions even if the test cases happen to return valid answers. This will be true for this and all future lab lessons.

Expected output

There are eight tests. The first test will run your program with input and check your output to make sure it matches what is expected. The next three tests are unit tests. The unit tests will directly call the presentValue function. The compilation of the unit test could fail if your presentValue function does not have the required signature. The final four tests will run your program with various input values and make sure you are calculating the correct answers.

You will get yellow highlighted text when you run the tests if your output is not what is expected. This can be because you are not getting the correct result. It could also be because your formatting does not match what is required. The checking that zyBooks does is very exacting and you must match it exactly. More information about what the yellow highlighting means can be found in course “How to use zyBooks” – especially section “1.4 zyLab basics”.

Finally, do not include a system("pause"); statement in your program. This will cause your verification steps to fail.

Note: that the system("pause"); command runs the pause command on the computer where the program is running. The pause command is a Windows command. Your program will be run on a server in the cloud. The cloud server may be running a different operating system (such as Linux).

Error message “Could not find main function”

Now that we are using functions some of the tests are unit tests. In the unit tests the zyBooks environment will call one or more of your functions directly.

To do this it has to find your main function.

Right now zyBooks has a problem with this when your int main() statement has a comment on it.

For example:

If your main looks as follows:

int main() // main function

You will get an error message:

Could not find main function

You need to change your code to:

// main function
int main()

If you do not make this change you will continue to fail the unit tests.

Students in a history class are asked to take a quiz posted on the course Web site.

1. Students in a history class are asked to take a quiz posted on the course Web site. The instructor has explained the following rules to the students: First, they are supposed to do their own work. Second, they are free to consult their lecture notes and the textbook while taking the quiz. Third, in order to get credit for the quiz, they must correctly answer at least 80 percent of the questions. If they do not get a score of 80 percent, they may retake the quiz as many times as they wish.

Mary and John are both taking the quiz. They are sitting next to each other in the computer room. John asks Mary for help in answering one of the questions. He says, “What’s the difference if you tell me the answer, I look it up in the book, or I find out from the computer that my answer is wrong and retake the quiz? In any case, I’ll end up getting credit for the right answer.” Mary tells John the correct answer to the question.

Discuss the morality of Mary’s decision.

It is important to understand the different types of attacks that can occur depending on both the operating system and underlying hardware in order to properly provide effective local-oriented cybersecurity defensive strategies.

It is important to understand the different types of attacks that can occur depending on both the operating system and underlying hardware in order to properly provide effective local-oriented cybersecurity defensive strategies.

Create a 10- to 15-slide or a 6- to 8-minute narrated presentation that outlines the vulnerabilities of embedded operating systems, such as, but not limited to, IoT devices, programmable logic devices, and vehicle control systems. This presentation can be created using your choice of presentation application as long as it is downloadable to the learning management system and/or instructor approved. Address the following within the presentation:

  1. Discuss the tools used by hackers to penetrate these devices and the effects of each penetration type.
  2. Provide insight as to how embedded operating system vendors provide defenses against hacking attempts
  3. Describe, in steps, at least one strategy used to attack embedded operating systems.
  4. Describe, in steps, at least one strategy used to defend against the chosen attack.
  5. Explain ways in which you feel the programmers of embedded operating systems can improve on their existing attempts to secure the devices which host their programs.

This assignment uses a rubric (attached). Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful completion.

Embedded OS Presentation Scoring Guide

CYB-610 Embedded OS Presentation Scoring Guide

Performance Level Ratings

Meets Expectations

 

Performance consistently met expectations in all essential areas of the assignment criteria, at times possibly exceeding expectations, and the quality of work overall was very good. The most critical goals were met.
Near Expectations

 

Performance did not consistently meet expectations. Performance failed to meet expectations in one or more essential areas of the assignment criteria, one or more of the most critical goals were not met.
Below Expectations

 

Performance was consistently below expectations in most essential areas of the assignment criteria, reasonable progress toward critical goals was not made. Significant improvement is needed in one or more important areas.

 

CriteriaBelow Expectations

 

Near Expectations

 

Meets Expectations

 

Earned
The students clearly describes the tools used by hackers to penetrate the specified devices and the effects of each penetration type.0 pts – 6 pts7 pts – 9 pts10 pts 
The student provides insight as to how embedded operating system vendors provide defenses against hacking attempts.0 pts – 6 pts7 pts – 9 pts10 pts 
The students describes, in steps, at least one strategy used to attack embedded operating systems.0 pts – 6 pts7 pts – 9 pts10 pts 
The students describes, in steps, at least one strategy to defend against the chosen attack.0 pts – 2 pts3 pts – 4 pts5 pts 
The student clearly explains innovative ideas to secure devices which host the programs.0 pts – 2 pts3 pts – 4 pts5 pts 
Industry standard technical writing is correct and utilized throughout.0 pts – 6 pts7 pts – 9 pts10 pts 
TOTAL   /50
Instructor Feedback

 

 

 

 

 

 

© 2018. Grand Canyon University. All Rights Reserved.