• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 6 páginas
Ensayo

Unit 4 Programming Assignment 2 Code

Document preview thumbnail
Vista previa 2 fuera de 6 páginas

This is the code for Unit 4 Assignment 2. It is necessary for passing the unit although the code itself is only worth a pass criteria as you can see below. The Program has been made using the programming language C# **Criteria Covered ** D3 Demonstrate individual responsibility, creativity and effective self-management management in the design, development and review of the computer program D2 Evaluate the final design and optimised software application against client requirements M2 Justify design decisions, showing how the design will result In an effective solution M3 Optimise the computer program to meet client requirements P4 Produce a design for a computer program to meet client requirements PS Review the design with others to identify and inform improvements to the proposed solution P6 Produce a computer program that meets client requirements P7 Review the extent to which the final computer program meets client requirements

Vista previa del contenido

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

public class Program
{
struct employee
{
public string name;
public int id;
public int totalpropsold;
public double commission;

}



static employee NewEmployee(int id)
{
employee temp = new employee();
bool validcheck, entrycheck;
string confirm;

do
{
entrycheck = true;

do
{
validcheck = true;
Console.Write("Please enter your full name: ");
temp.name = Console.ReadLine();
if (temp.name.Any(c => !char.IsLetter(c)))
{
Console.WriteLine("You have not entered a
name.");
validcheck = false;
}
else if(temp.name == "")
{
Console.WriteLine("Please enter a name do not
leave the field blank.");
validcheck = false;
}



} while (validcheck != true);

do
{
validcheck = true;

, Console.Write("Please enter your unique 4 digit
ID: ");
bool parseCheck =
int.TryParse(Console.ReadLine(), out temp.id);
if (parseCheck == false)
{
Console.WriteLine("Invalid. You must enter a
numeric value");
validcheck = false;
}
else if (temp.id > 9999)
{
Console.WriteLine("Invalid. Your unique ID
must be 4 digits");
validcheck = false;
}
else if (temp.id < 1000)
{
Console.WriteLine("Your ID must be 4
digits");
validcheck = false;
}


} while (validcheck != true);

do
{
validcheck = true;
Console.Write("Please enter the number of
properties you have sold this week: ");
bool parseCheck = int.TryParse(Console.ReadLine(),
out temp.totalpropsold);
if (parseCheck == false)
{
Console.WriteLine("Invalid. Please enter a
number");
validcheck = false;
}

} while (validcheck != true);

do
{
validcheck = true;
Console.Write("Please confirm that you name is " +
temp.name + " and you have sold " + temp.totalpropsold + " Properties
[y/n]");
confirm = Console.ReadLine().ToLower();
if (confirm != "y" && confirm != "n")
{

Información del documento

Nivel de Estudio
Tema
Subido en
2 de octubre de 2022
Número de páginas
6
Escrito en
2021/2022
Tipo
Ensayo
Profesor(es)
Desconocido
Grado
A+
$8.27

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
adilhass
3.9
(20)
Vendido
174
Seguidores
136
Artículos
15
Última venta
1 año hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes